Changeset 163 for Include


Ignore:
Timestamp:
Mar 13, 2007, 4:47:36 AM (18 years ago)
Author:
dai
Message:

Thisへの代入をコンストラクタ呼び出しに変更。
デフォルトコンストラクタを追加。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/DateTime.ab

    r107 r163  
    33#ifndef __SYSTEM_DATETIME_AB__
    44#define __SYSTEM_DATETIME_AB__
    5 
    65
    76Class DateTime
     
    1110    Static MinValue = 316224000000000 As Int64 'Const
    1211
     12    Sub DateTime()
     13        DateTime(316224000000000)
     14    End Sub
     15
    1316    Sub DateTime(ticks As Int64)
    1417        Ticks = ticks
     
    2730        End If
    2831        DateTime(316224000000000)
    29         This = AddYears(year - 1)
     32        DateTime( AddYears(year - 1) )
    3033
    3134        Dim days As Long
     
    3538        Next
    3639        days += day
    37         This = AddDays(days - 1)
     40        DateTime( AddDays(days - 1) )
    3841    End Sub
    3942
     
    4851            debug
    4952        End If
     53
    5054        DateTime(year, month, day)
    51         This = AddHours(hour)
    52         This = AddMinutes(minute)
    53         This = AddSeconds(second)
     55        DateTime( AddHours(hour) )
     56        DateTime( AddMinutes(minute) )
     57        DateTime( AddSeconds(second) )
    5458    End Sub
    5559
     
    6165    Sub DateTime(year As Long, month As Long, day As Long, hour As Long, minute As Long, second As Long, millisecond As Long)
    6266        DateTime(year, month, day, hour, minute, second)
    63         This = AddMilliseconds(millisecond)
     67        DateTime( AddMilliseconds(millisecond) )
    6468    End Sub
    6569
Note: See TracChangeset for help on using the changeset viewer.