You are not logged in.

#1 2021-06-22 11:41:03

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,373
Website

Day of the week from date?

date "+%u" --date 20210603 # returns
4

as expected, but how does it know that date is YYYYMMDD? I mean, am i missing some localization trick here or will this example always work correctly?

Offline

#2 2021-06-22 13:19:58

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,281
Website

Re: Day of the week from date?

See the DATE STRING section near the bottom of 'man date'. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#3 2021-06-23 06:25:26

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,373
Website

Re: Day of the week from date?

^The happy/overly optimistic part that mostly everything goes? smile

Offline

#4 2021-06-23 06:54:12

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,281
Website

Re: Day of the week from date?

Seems to be...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB