Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-06-01 Thread Mike Dewhirst
On 24/05/2023 6:00 pm, Mike Dewhirst wrote: On 23/05/2023 7:16 pm, Chris Green wrote: Mike Dewhirst wrote: [-- multipart/mixed, encoding 7bit, 22 lines --] [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] On 21/05/2023 5:53 am, Chris Green wrote: I'm converting a bash

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-24 Thread Mike Dewhirst
On 23/05/2023 7:16 pm, Chris Green wrote: Mike Dewhirst wrote: [-- multipart/mixed, encoding 7bit, 22 lines --] [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] On 21/05/2023 5:53 am, Chris Green wrote: I'm converting a bash script to python as it has become rather clumsy

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-23 Thread Alex Pinkney
On Tue, 23 May 2023, 17:25 Chris Green, wrote: > Mike Dewhirst wrote: > > [-- multipart/mixed, encoding 7bit, 22 lines --] > > > > [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] > > > > On 21/05/2023 5:53 am, Chris Green wrote: > > > I'm converting a bash script to python as

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-23 Thread Chris Green
Mike Dewhirst wrote: > [-- multipart/mixed, encoding 7bit, 22 lines --] > > [-- text/plain, encoding base64, charset: UTF-8, 16 lines --] > > On 21/05/2023 5:53 am, Chris Green wrote: > > I'm converting a bash script to python as it has become rather clumsy > > in bash. > > What is the use

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Mike Dewhirst
On 21/05/2023 5:53 am, Chris Green wrote: I'm converting a bash script to python as it has become rather clumsy in bash. What is the use case? However I have hit a problem with converting dates, the bash script has:- dat=$(date --date "$1" +"%Y/%m/%d") and this will accept almost

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Tim Williams
On Mon, May 22, 2023 at 12:41 PM Mats Wichmann wrote: > On 5/20/23 13:53, Chris Green wrote: > > I'm converting a bash script to python as it has become rather clumsy > > in bash. > > > > However I have hit a problem with converting dates, the bash script > > has:- > > > > dat=$(date --date

Re: Is there a Python module to parse a date like the 'date' command in Linux?

2023-05-22 Thread Mats Wichmann
On 5/20/23 13:53, Chris Green wrote: I'm converting a bash script to python as it has become rather clumsy in bash. However I have hit a problem with converting dates, the bash script has:- dat=$(date --date "$1" +"%Y/%m/%d") and this will accept almost anything reasonably sensible that