Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
12
Task/Date-format/OCaml/date-format-2.ml
Normal file
12
Task/Date-format/OCaml/date-format-2.ml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
let months = [| "January"; "February"; "March"; "April"; "May"; "June";
|
||||
"July"; "August"; "September"; "October"; "November"; "December" |]
|
||||
|
||||
let days = [| "Sunday"; "Monday"; "Tuesday"; (* Sunday is 0 *)
|
||||
"Wednesday"; "Thursday"; "Friday"; "Saturday" |]
|
||||
|
||||
# Printf.sprintf "%s, %s %d, %d"
|
||||
days.(gmt.tm_wday)
|
||||
months.(gmt.tm_mon)
|
||||
gmt.tm_mday
|
||||
(1900 + gmt.tm_year) ;;
|
||||
- : string = "Friday, August 29, 2008"
|
||||
Loading…
Add table
Add a link
Reference in a new issue