Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
31
Task/Date-format/OxygenBasic/date-format.basic
Normal file
31
Task/Date-format/OxygenBasic/date-format.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
extern lib "kernel32.dll"
|
||||
|
||||
'http://msdn.microsoft.com/en-us/library/windows/desktop/ms724950(v=vs.85).aspx
|
||||
|
||||
typedef struct _SYSTEMTIME {
|
||||
WORD wYear;
|
||||
WORD wMonth;
|
||||
WORD wDayOfWeek;
|
||||
WORD wDay;
|
||||
WORD wHour;
|
||||
WORD wMinute;
|
||||
WORD wSecond;
|
||||
WORD wMilliseconds;
|
||||
} SYSTEMTIME, *PSYSTEMTIME;
|
||||
|
||||
void GetSystemTime(SYSTEMTIME*t);
|
||||
void GetLocalTime(SYSTEMTIME*t);
|
||||
|
||||
end extern
|
||||
|
||||
SYSTEMTIME t
|
||||
'GetSystemTime t 'GMT (Greenwich Mean Time)
|
||||
GetLocalTime t
|
||||
|
||||
String WeekDay[7]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}
|
||||
String MonthName[12]={"January","February","March","April","May","June","July","August","September","October","November","December"}
|
||||
String month=str t.wMonth : if len(month)<2 then month="0"+month
|
||||
String day=str t.wDay : if len(day)<2 then day="0"+day
|
||||
'
|
||||
print "" t.wYear "-" month "-" day
|
||||
print WeekDay[t.wDayOfWeek+1 and 7 ] " " MonthName[t.wMonth and 31] " " t.wDay " " t.wYear
|
||||
Loading…
Add table
Add a link
Reference in a new issue