Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,12 @@
compoundDuration[x_Integer] :=
StringJoin @@ (Riffle[
ToString /@ ((({Floor[x/604800],
Mod[x, 604800]} /. {a_, b_} -> {a, Floor[b/86400],
Mod[b, 86400]}) /. {a__, b_} -> {a, Floor[b/3600],
Mod[b, 3600]}) /. {a__, b_} -> {a, Floor[b/60],
Mod[b, 60]}), {" wk, ", " d, ", " hr, ", " min, ",
" sec"}] //. {a___, "0", b_, c___} -> {a, c})
Grid[Table[{n, "secs =",
compoundDuration[n]}, {n, {7259, 86400, 6000000}}],
Alignment -> {Left, Baseline}]