Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
41
Task/Date-format/PureBasic/date-format.basic
Normal file
41
Task/Date-format/PureBasic/date-format.basic
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
;Declare Procedures
|
||||
Declare.s MonthInText()
|
||||
Declare.s DayInText()
|
||||
|
||||
;Output the requested strings
|
||||
Debug FormatDate("%yyyy-%mm-%dd", Date())
|
||||
Debug DayInText() + ", " + MonthInText() + FormatDate(" %dd, %yyyy", Date())
|
||||
|
||||
;Used procedures
|
||||
Procedure.s DayInText()
|
||||
Protected d$
|
||||
Select DayOfWeek(Date())
|
||||
Case 1: d$="Monday"
|
||||
Case 2: d$="Tuesday"
|
||||
Case 3: d$="Wednesday"
|
||||
Case 4: d$="Thursday"
|
||||
Case 5: d$="Friday"
|
||||
Case 6: d$="Saturday"
|
||||
Default: d$="Sunday"
|
||||
EndSelect
|
||||
ProcedureReturn d$
|
||||
EndProcedure
|
||||
|
||||
Procedure.s MonthInText()
|
||||
Protected m$
|
||||
Select Month(Date())
|
||||
Case 1: m$="January"
|
||||
Case 2: m$="February"
|
||||
Case 3: m$="March"
|
||||
Case 4: m$="April"
|
||||
Case 5: m$="May"
|
||||
Case 6: m$="June"
|
||||
Case 7: m$="July"
|
||||
Case 8: m$="August"
|
||||
Case 9: m$="September"
|
||||
Case 10:m$="October"
|
||||
Case 11:m$="November"
|
||||
Default:m$="December"
|
||||
EndSelect
|
||||
ProcedureReturn m$
|
||||
EndProcedure
|
||||
Loading…
Add table
Add a link
Reference in a new issue