on 492ae2f help sign in
42 lines 1.0 kB history raw
1### `++yell`
3Produce a parsed daily time format from an atomic date.
5`now` is a `@d`.
7Source
8------
10 ++ yell :: tarp from @d
11 |= now/@d
12 ^- tarp
13 =+ sec=(rsh 6 1 now)
14 =+ ^= fan
15 =+ [muc=4 raw=(end 6 1 now)]
16 |- ^- (list @ux)
17 ?: |(=(0 raw) =(0 muc))
18 ~
19 => .(muc (dec muc))
20 [(cut 4 [muc 1] raw) $(raw (end 4 muc raw))]
21 =+ day=(div sec day:yo)
22 => .(sec (mod sec day:yo))
23 =+ hor=(div sec hor:yo)
24 => .(sec (mod sec hor:yo))
25 =+ mit=(div sec mit:yo)
26 => .(sec (mod sec mit:yo))
27 [day hor mit sec fan]
28 ::
31Examples
32--------
34 ~zod/try=> (yell ~2014.3.20..05.42.53..7456)
35 [d=106.751.991.820.094 h=5 m=42 s=53 f=~[0x7456]]
36 ~zod/try=> (yell ~2014.6.9..19.09.40..8b66)
37 [d=106.751.991.820.175 h=19 m=9 s=40 f=~[0x8b66]]
38 ~zod/try=> (yell ~1776.7.4)
39 [d=106.751.991.733.273 h=0 m=0 s=0 f=~]
42***