JanetDocsPlaygroundI'm feeling luckyGitHub sign in
# Print out the current time in Last-Modified header-compliant # form. (reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified) (def weekdayMap [ "Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat" ]) (def monthMap ["Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"]) (def dt (os/date (os/time) true)) (string/format "%s, %02d %s %04d %02d:%02d:%02d" (weekdayMap (dt :week-day)) (dt :month-day) (monthMap (dt :month)) (dt :year) (dt :hours) (dt :minutes) (dt :seconds))