Changeset 272 for Include/Classes/System/DateTime.ab
- Timestamp:
- Jun 12, 2007, 7:24:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/DateTime.ab
r268 r272 178 178 End Function 179 179 180 Static Function To Day() As DateTime180 Static Function Today() As DateTime 181 181 Dim time As SYSTEMTIME 182 182 GetLocalTime(time) … … 292 292 Dim dateFormatSize = GetDateFormat(LOCALE_USER_DEFAULT, 0, time, NULL, NULL, 0) 293 293 Dim timeFormatSize = GetTimeFormat(LOCALE_USER_DEFAULT, 0, time, NULL, NULL, 0) 294 Dim dateTimeFormats = malloc(dateFormatSize + timeFormatSize) As PTSTR 294 Dim strLength = dateFormatSize + timeFormatSize 295 Dim dateTimeFormats = GC_malloc_atomic(SizeOf (TCHAR) * (strLength)) As PTSTR 295 296 GetDateFormat(LOCALE_USER_DEFAULT, 0, time, NULL, dateTimeFormats, dateFormatSize) 296 297 dateTimeFormats[dateFormatSize - 1] = Asc(" ") 297 298 GetTimeFormat(LOCALE_USER_DEFAULT, 0, time, NULL, dateTimeFormats + dateFormatSize, timeFormatSize) 298 299 Return New String(dateTimeFormats )299 'Debug 300 Return New String(dateTimeFormats, strLength) 300 301 End Function 301 302
Note:
See TracChangeset
for help on using the changeset viewer.