saheb11 / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

Ordinal suffix, .toString Bug #78

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. http://www.datejs.com/test/tostring/index.html
2. View the results for 21 & 22

What is the expected output? What do you see instead?
21th & 22th. 21st & 22nd

Original issue reported on code.google.com by brend...@gmail.com on 9 Jul 2009 at 2:12

GoogleCodeExporter commented 8 years ago
Hi brendo.a,

Thanks for pointing out the error in the tests. I think just the label on the 
test is
wrong. 

The following appears to work correctly.

Date.today().set({ day : 21 }).toString("S") // "st"
Date.today().set({ day : 22 }).toString("S") // "nd"

I'll update the label on the test(s).

Original comment by geoff%co...@gtempaccount.com on 9 Jul 2009 at 7:27