ocpsoft / prettytime

Social Style Date and Time Formatting for Java
http://ocpsoft.org/prettytime/
Apache License 2.0
1.29k stars 253 forks source link

Fix negative duration in Russian version (#182) #189

Closed sryze closed 4 years ago

sryze commented 4 years ago

This patch fixes the issue with negative duration values in Russian localization (#182) and adds more tests for different forms of Russian time units.

I just added a call to Math.abs() to make formatUnrounded() behave like format(), where getQuantityRounded() drops the sign as well.

lincolnthree commented 4 years ago

Thanks @sryze - This fix looks good. Sorry for the delays. We've been super busy. I'll take a look at releasing this tomorrow.

sryze commented 4 years ago

Thanks, good to hear this :+1:

sryze commented 4 years ago

@lincolnthree are you going to make a new release with this fix?