arrow
arrow copied to clipboard
Humanize more human version
Increased ability to convert to yesterday instead of 1 day ago, or tomorrow instead of in 1 day. For example :
present = arrow.now() # september 29th (thursday)
past = present.shift(day=1)
present.humanize(past) # Tomorrow
past = present.shift(day=0)
present.humanize(past) # Just Now, if have second become 10 second ago etc... using existing arrow humanize function
past = present.shift(day=-1)
present.humanize(past) # Yesterday
past = present.shift(day=-2)
present.humanize(past) # Tuesday (only get days of week)
past = present.shift(day=-3)
present.humanize(past) # Monday
past = present.shift(day=-4)
present.humanize(past) # Sunday
past = present.shift(day=-5)
present.humanize(past) # Saturday
past = present.shift(day=-6)
present.humanize(past) # Friday
past = present.shift(day=-7)
present.humanize(past) # Last Week
past = present.shift(day=-8)
present.humanize(past) # september 21th (just get date, or use existing arrow humanize function)
I got inspiration from whatsapp app
Is there anybody working on this? If not I'd like to do it.
@nijek you can give it a shot, I'm working on generating locales off of CLDR, so if you can work within the data and ranges they have, that would be great!