Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Leap-year/OCaml/leap-year-1.ocaml
Normal file
2
Task/Leap-year/OCaml/leap-year-1.ocaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
let is_leap_year ~year =
|
||||
year mod (if year mod 100 = 0 then 400 else 4) = 0
|
||||
10
Task/Leap-year/OCaml/leap-year-2.ocaml
Normal file
10
Task/Leap-year/OCaml/leap-year-2.ocaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
let is_leap_year ~year =
|
||||
let tm =
|
||||
Unix.mktime {
|
||||
(Unix.gmtime (Unix.time())) with
|
||||
Unix.tm_year = (year - 1900);
|
||||
tm_mon = 1 (* feb *);
|
||||
tm_mday = 29
|
||||
}
|
||||
in
|
||||
(tm.Unix.tm_mday = 29)
|
||||
Loading…
Add table
Add a link
Reference in a new issue