Jump to content

Find the weekday


Recommended Posts

Posted

First, I am indebted to the inspiration provided by @BocciaMan's shell script in this thread and also to Vitor's help in the same thread. As a result I've run up a small workflow to return the weekday of any given date (in either European or US format). It's rather better, I think, than my old and more cumbersome Get weekday of date workflow.

 

Everything is explained in the workflow configuration and there are no dependencies.

 

Initialscreen.thumb.png.438224f8bc3532c00262d3120d9d3718.png

 

Eurpoeanformat.thumb.png.1ad60153e6a987e3732c559b49733c60.png

 

USformat.thumb.png.50ac3f81c52b1e3fc279363042ffa687.png

 

Error.thumb.png.b64677216814ac2ca0d5b68e021e6ffb.png

 

Of course, you're not limited to dates in 2024. 😀

 

GitHub download link

 

Stephen

Posted (edited)

Let me have a think about that when I have a moment. It should be possible.

 

Is that a South East Asian date format? (Just wondering what I should call it in the config.!)

 

Edit: Also please clarify that the date you gave refers to 2 June 2024.

 

Further edit: Sorry for another edit but I'm unclear whether you're wanting to amend an existing format (by replacing "/” with "-”) or whether you're referrring to a new format which is not either US or European format.

 

Stephen

Edited by Stephen_C
Posted

😊 Thanks! Yes, you're almost certainly right: sorry not to have noticed that. I was so fixated on trying to work out whether it meant 2 June or 6 February I didn't even think of that alternative. I'm sure it would be relatively easy to allow for ISO date format—I just need to find a little time to look again at the script. There are times when I've really had enough of dates, date arithmetic and date formats. 😀

 

Stephen

Posted

@yinan version 1.2 adds the ISO date format to the date choices in the configuration. I've also removed the padding from single digit dates displayed at the end of the workflow. In other words for European and ISO date formats "07 February 2024” now displays as "7 February 2024” in the result (or "February 7, 2024", rather than "February 07, 2024" if you have selected US format).

 

@sepulchra thanks for the pointer to a common sense view of what Yinan wanted. 😀

 

Stephen

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...