H
H
hashspark2013-09-14 20:45:26
Python
hashspark, 2013-09-14 20:45:26

How to work with such date?

Hello, sometimes there are dates of the format (as on Habré):
today in hh:mm
yesterday in hh:mm
dd September in hh:mm is the current year, the month is written in the genitive case
dd September 2012 in hh:mm
How to get the date in the usual format from this line? Can anyone come across? Are there nice solutions?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2013-09-14
@hashspark

See a similar question. There though and under pkhp a question. But there were options with python.
Can you tell me a library for parsing a human-readable date?
True, there are more “perverted” variants of writing dates.

O
OnYourLips, 2013-09-15
@OnYourLips

You do not need to write the date as a string so that you do not have to parse it later. It is necessary to store the date in date format and only when outputting it, convert it to a string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question