Package jp.gr.java_conf.dangan.util
Class WindowsDate
- java.lang.Object
-
- java.util.Date
-
- jp.gr.java_conf.dangan.util.WindowsDate
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable<java.util.Date>
public class WindowsDate extends java.util.Date implements java.lang.Cloneable
Windows??FILETIME?`??????????????Date???h?χ?N???X?B
FILETIME ?? 1601?N 1?? 1?? 0??0??0?b???????o???????? 100?i?m?b?P????????64?r?b?g?l?B
?}???N???X???? FILETIME ?? long(64?r?b?g?l)???????????????? ???{?I???????????????????B
1601?N 1?? 1?? 0??0??0?b???O???????????????????? WindowsDate( Date date ) ???AWindowsDate.setTime( long time )???g?p?????B
-- revision history -- $Log: WindowsDate.java,v $ Revision 1.1 2002/12/05 00:00:00 dangan [maintenance] javadoc ?R?????g???X?y???~?X???C???B ?\?[?X???? Revision 1.0 2002/08/05 00:00:00 dangan add to version control [bug fix] set?n???\?b?h?? ?????O?????????Z?b?g???????????? ???O????????P?[?X?????????????????????????s????????????????B checkRange ??????????????????????????B [maintenance] ?^?u???p?~ ???C?Z???X?χ???C??
- Version:
- $Revision: 1.1 $
- Author:
- $Author: dangan $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
TIME_DIFFERENCE
FILETIME?`?????f?[?^???Ajava.util.Date.getTime() ?? ?????????????`?????????????? 100?i?m?Z?J???h?P?????????????l?B ???N?A?[?b?????l?χ?????????????B
-
Constructor Summary
Constructors Constructor Description WindowsDate()
?f?t?H???g?R???X?g???N?^?B ???????????????????? WindowsDate???\?z?????B ?i?m?b?P??????????????????????????A0?????????????BWindowsDate(long time)
????????64?r?b?g??FILETIME?`???????????????? ?V???WindowsDate???\?z?????BWindowsDate(java.util.Date date)
date?????????????????\?? WindowsDate???\?z?????B
date?? WindowsDate ???C???X?^???X?????? ?i?m?b?P???????????R?s?[?????????A???????O???????? ?i?m?b?P???????????? 0 ?????????????B
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
?}???I?u?W?F?N?g???R?s?[???????Blong
getWindowsTime()
?}?? WindowsDate???????????????? FILETIME ?`?????????Bvoid
setDate(int date)
Deprecated.void
setHours(int hours)
Deprecated.void
setMinutes(int minutes)
Deprecated.void
setMonth(int month)
Deprecated.void
setSeconds(int seconds)
Deprecated.void
setTime(long time)
?}?? WindowsDate ???????????? 1970?N1??1?? 00:00:00 GMT???? time ?~???b?o?????????????????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????Bvoid
setWindowsTime(long time)
?}?? WindowsDate ?? FILETIME?`???????????????????????Bvoid
setYear(int year)
Deprecated.
-
-
-
Field Detail
-
TIME_DIFFERENCE
public static final long TIME_DIFFERENCE
FILETIME?`?????f?[?^???Ajava.util.Date.getTime() ?? ?????????????`?????????????? 100?i?m?Z?J???h?P?????????????l?B ???N?A?[?b?????l?χ?????????????B- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WindowsDate
public WindowsDate()
?f?t?H???g?R???X?g???N?^?B ???????????????????? WindowsDate???\?z?????B ?i?m?b?P??????????????????????????A0?????????????B- Throws:
java.lang.IllegalArgumentException
- ???????????? FILETIME ?`?????\???????? ?????O???????????B
-
WindowsDate
public WindowsDate(java.util.Date date)
date?????????????????\?? WindowsDate???\?z?????B
date?? WindowsDate ???C???X?^???X?????? ?i?m?b?P???????????R?s?[?????????A???????O???????? ?i?m?b?P???????????? 0 ?????????????B- Parameters:
date
- ?V?????\?z?????? WindowsDate ???????????????????????? Date ???I?u?W?F?N?g- Throws:
java.lang.IllegalArgumentException
- ???????????? FILETIME ?`?????\???????? ?????O???????????B
-
WindowsDate
public WindowsDate(long time)
????????64?r?b?g??FILETIME?`???????????????? ?V???WindowsDate???\?z?????B- Parameters:
time
- FILETIME?`????????????
-
-
Method Detail
-
clone
public java.lang.Object clone()
?}???I?u?W?F?N?g???R?s?[???????B- Overrides:
clone
in classjava.util.Date
- Returns:
- ?}??WindowsDate?I?u?W?F?N?g??????
-
setYear
public void setYear(int year)
Deprecated.?}?? WindowsDate ???????N?? year ?? ?w?????????l??1900???????????????????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setYear
in classjava.util.Date
- Parameters:
year
- 1900???????}???????????\???????? ?N???l- Throws:
java.lang.IllegalArgumentException
- year ?????X???????}?? FILETIME?`??????????? ??????????????????????
-
setMonth
public void setMonth(int month)
Deprecated.?}?? WindowsDate ?????????? month ???w?????????l???????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setMonth
in classjava.util.Date
- Parameters:
month
- 0??1???A1??2???????????????????l- Throws:
java.lang.IllegalArgumentException
- month ?????X???????}?? FILETIME?`??????????? ??????????????????????
-
setDate
public void setDate(int date)
Deprecated.?}?? WindowsDate ?????? ???????? ???????????????? date ???w?????????l???????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setDate
in classjava.util.Date
- Parameters:
date
- 1??1???A2??2???????????????????l- Throws:
java.lang.IllegalArgumentException
- date ?????X???????}?? FILETIME?`??????????? ??????????????????????
-
setHours
public void setHours(int hours)
Deprecated.?}?? WindowsDate ???????????????????????? hours ???w?????????l???????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setHours
in classjava.util.Date
- Parameters:
hours
- ???????l- Throws:
java.lang.IllegalArgumentException
- hours ?????X???????}?? FILETIME?`??????????? ??????????????????????
-
setMinutes
public void setMinutes(int minutes)
Deprecated.?}?? WindowsDate ???????????????????????? minutes ???w?????????l???????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setMinutes
in classjava.util.Date
- Parameters:
minutes
- ?????l- Throws:
java.lang.IllegalArgumentException
- minutes ?????X???????}?? FILETIME?`??????????? ??????????????????????
-
setSeconds
public void setSeconds(int seconds)
Deprecated.?}?? WindowsDate ???????????????????b???? secounds ???w?????????l???????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setSeconds
in classjava.util.Date
- Parameters:
secounds
- ?b??- Throws:
java.lang.IllegalArgumentException
- secounds ?????X???????}?? FILETIME?`??????????? ??????????????????????
-
setTime
public void setTime(long time)
?}?? WindowsDate ???????????? 1970?N1??1?? 00:00:00 GMT???? time ?~???b?o?????????????????????B
?}?????\?b?h???????`?F?b?N???s???????????????χ???????B- Overrides:
setTime
in classjava.util.Date
- Parameters:
time
- 1970?N1??1?? 00:00:00GMT ???????o???~???b- Throws:
java.lang.IllegalArgumentException
- time ??FILETIME?`??????????? ?????????????????????????
-
setWindowsTime
public void setWindowsTime(long time)
?}?? WindowsDate ?? FILETIME?`???????????????????????B- Parameters:
time
- FILETIME?`????????????
-
getWindowsTime
public long getWindowsTime()
?}?? WindowsDate???????????????? FILETIME ?`?????????B- Returns:
- FILETIME?`?????l
-
-