You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current format for dt.in_words() (1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds) can be too verbose for some use-cases where a more compact format would be more suitable, so I propose adding an optional format parameter for more granular control of units\fields.
That way, if we call it like dt.in_words(format='YMD') we'd get 1 year 2 months 25 days, dt.in_words(format='MDm') would result in 14 months 25 days 306 minutes and so on
The text was updated successfully, but these errors were encountered:
BrutuZ
changed the title
Allow formatting of ìn_words`
Allow formatting of in_wordsDec 30, 2023
Feature Request
A
format
parameter in thein_words()
function to allow limiting the units used.Reasoning
Assuming a
The current format for
dt.in_words()
(1 year 2 months 3 weeks 4 days 5 hours 6 minutes 7 seconds
) can be too verbose for some use-cases where a more compact format would be more suitable, so I propose adding an optionalformat
parameter for more granular control of units\fields.That way, if we call it like
dt.in_words(format='YMD')
we'd get1 year 2 months 25 days
,dt.in_words(format='MDm')
would result in14 months 25 days 306 minutes
and so onThe text was updated successfully, but these errors were encountered: