Date.st
branchjv
changeset 20578 39641ba8d6e0
parent 19899 25b35b705da5
parent 20409 795098692ba7
child 21024 8734987eb5c7
equal deleted inserted replaced
20577:a27e7b3031cb 20578:39641ba8d6e0
   923      Date readYYYYMMDDFrom:'19991004' onError:['wrong date']  
   923      Date readYYYYMMDDFrom:'19991004' onError:['wrong date']  
   924      Date readYYYYMMDDFrom:'911004' onError:['wrong date']  
   924      Date readYYYYMMDDFrom:'911004' onError:['wrong date']  
   925     "
   925     "
   926 ! !
   926 ! !
   927 
   927 
   928 
       
   929 !Date class methodsFor:'change & update'!
   928 !Date class methodsFor:'change & update'!
   930 
   929 
   931 update:something with:aParameter from:changedObject
   930 update:something with:aParameter from:changedObject
   932     ((something == #Language) or:[something == #LanguageTerritory]) ifTrue:[
   931     ((something == #Language) or:[something == #LanguageTerritory]) ifTrue:[
   933         "just remember change for next access"
   932         "just remember change for next access"
  1895 
  1894 
  1896     "Created: 16.11.1995 / 22:50:17 / cg"
  1895     "Created: 16.11.1995 / 22:50:17 / cg"
  1897     "Modified: 8.10.1996 / 19:25:39 / cg"
  1896     "Modified: 8.10.1996 / 19:25:39 / cg"
  1898 ! !
  1897 ! !
  1899 
  1898 
  1900 
       
  1901 !Date class methodsFor:'private'!
  1899 !Date class methodsFor:'private'!
  1902 
  1900 
  1903 dayAbbrevsForLanguage:languageOrNilForDefault
  1901 dayAbbrevsForLanguage:languageOrNilForDefault
  1904     <resource: #obsolete>
  1902     <resource: #obsolete>
  1905     "return a collection of short day-names for a given language or the 
  1903     "return a collection of short day-names for a given language or the 
  2105 
  2103 
  2106     ^ self basicNew fromOSTime:osTime
  2104     ^ self basicNew fromOSTime:osTime
  2107 
  2105 
  2108     "
  2106     "
  2109      Date fromOSTime:0              -> on UNIX: this should return 1st Jan 1970
  2107      Date fromOSTime:0              -> on UNIX: this should return 1st Jan 1970
  2110                                        thats where Unix time starts
  2108                                        that's where Unix time starts
  2111                                        On other systems, it may be something different.
  2109                                        On other systems, it may be something different.
  2112 
  2110 
  2113      Date fromOSTime:(24*60*60*1000) -> on UNIX: the day after
  2111      Date fromOSTime:(24*60*60*1000) -> on UNIX: the day after
  2114     "
  2112     "
  2115 ! !
  2113 ! !
  2116 
       
  2117 
  2114 
  2118 !Date methodsFor:'Compatibility-ANSI'!
  2115 !Date methodsFor:'Compatibility-ANSI'!
  2119 
  2116 
  2120 dayOfWeek
  2117 dayOfWeek
  2121     "return the week-day of the receiver - 1 is sunday, 7 for saturday.
  2118     "return the week-day of the receiver - 1 is sunday, 7 for saturday.
  3272      Date today asUtcTimestamp
  3269      Date today asUtcTimestamp
  3273     "
  3270     "
  3274 ! !
  3271 ! !
  3275 
  3272 
  3276 
  3273 
  3277 
       
  3278 !Date methodsFor:'obsolete'!
  3274 !Date methodsFor:'obsolete'!
  3279 
  3275 
  3280 asAbsoluteTime
  3276 asAbsoluteTime
  3281     "deprecated, use #asTimestamp"
  3277     "deprecated, use #asTimestamp"
  3282     <resource:#obsolete>
  3278     <resource:#obsolete>
  3342     <resource: #obsolete>
  3338     <resource: #obsolete>
  3343 
  3339 
  3344     self obsoleteMethodWarning:'use #addDays:'.
  3340     self obsoleteMethodWarning:'use #addDays:'.
  3345     ^ self addDays:days
  3341     ^ self addDays:days
  3346 ! !
  3342 ! !
  3347 
       
  3348 
  3343 
  3349 !Date methodsFor:'printing & storing'!
  3344 !Date methodsFor:'printing & storing'!
  3350 
  3345 
  3351 addPrintBindingsTo:aDictionary
  3346 addPrintBindingsTo:aDictionary
  3352     "see comment in addPrintBindingsTo:language:"
  3347     "see comment in addPrintBindingsTo:language:"