pretty date today

This commit is contained in:
SuperCoolYun 2024-06-14 12:24:29 -04:00
parent 9f849a6773
commit 5a63847b37

View File

@ -94,12 +94,12 @@
=/ msg !<(message q.q.saga.idea) =/ msg !<(message q.q.saga.idea)
^- manx ^- manx
?: =(our.bowl from.msg) ?: =(our.bowl from.msg)
(render-our-message msg) (render-our-message msg bowl)
;div.fc.g2.msg ;div.fc.g2.msg
=style "align-self: flex-start;" =style "align-self: flex-start;"
;div.fr.ac.jb ;div.fr.ac.jb
;p.s-2.f3: {(scow %p from.msg)} ;p.s-2.f3: {(scow %p from.msg)}
;p.s-2.f3: {(pretty-date now.msg)} ;p.s-2.f3: {(pretty-date now.msg bowl)}
== ==
;div.bd1.br1.p3 ;div.bd1.br1.p3
;p: {(trip contents.msg)} ;p: {(trip contents.msg)}
@ -107,12 +107,12 @@
== ==
:: ::
++ render-our-message ++ render-our-message
|= msg=message |= [msg=message =bowl:neo]
;div.fc.g2.msg ;div.fc.g2.msg
=style "align-self: flex-end;" =style "align-self: flex-end;"
;div.fr.ac.jb ;div.fr.ac.jb
;p.s-2.f3: {(scow %p from.msg)} ;p.s-2.f3: {(scow %p from.msg)}
;p.s-2.f3: {(pretty-date now.msg)} ;p.s-2.f3: {(pretty-date now.msg bowl)}
== ==
;div.fr.je.bd2.br1.b1.p3 ;div.fr.je.bd2.br1.b1.p3
;p: {(trip contents.msg)} ;p: {(trip contents.msg)}
@ -155,7 +155,7 @@
== ==
:: ::
++ pretty-date ++ pretty-date
|= date=@da |= [date=@da =bowl:neo]
^- tape ^- tape
=/ d (yore date) =/ d (yore date)
=/ months =/ months
@ -174,5 +174,7 @@
"Nov" "Nov"
"Dec" "Dec"
== ==
?: &(=(m:d m:(yore now.bowl)) =(d:t:d d:t:(yore now.bowl)))
"{(y-co:co h:t:d)}:{(y-co:co m:t:d)}"
"{(y-co:co h:t:d)}:{(y-co:co m:t:d)} {(y-co:co d:t:d)} {(snag (dec m:d) months)}" "{(y-co:co h:t:d)}:{(y-co:co m:t:d)} {(y-co:co d:t:d)} {(snag (dec m:d) months)}"
-- --