rbf.formatDate issue

Posted by nareshroyalty on 30-Sep-2014 05:05

Hi,

If I use rbf_formatDate(d, 'yyyy-MMM-dd hh:ss') to format a date . The date returned is "2014-0909-26 hh:ss" but if I use rbv_api.formatDate(d, "yyyy-MMM-dd hh:ss"); to format a date. The date returned is "2014-Sep-26 11:03" which is the expected value.

Is there a bug in rbf_formatDate(d, 'yyyy-MMM-dd hh:ss') ?

Thanks,

Naresh

All Replies

Posted by Manooj Murali on 30-Sep-2014 05:18

I can confirm that the implementation will not work for a pattern which contains 'MMM', 'hh' & 'ss' but to confirm if this is a bug, we may have to refer to the API's documentation. Does it say that these patterns are supported?

Posted by nareshroyalty on 30-Sep-2014 05:23

if the pattern works for  rbv_api.formatDate then it shoud work for  rbf_formatDate also. And the api documentation says "Pattern uses the same conventions as Java SimpleDateFormat class."

Posted by Manooj Murali on 30-Sep-2014 06:51

Agreed. Just wanted to confirm if there were initial discussions made with regards to the formats supported by this API. Nonetheless, I have put in an issue PSC00315336 for 4.0.0 to make these two API's consistent.

-Thanks

Posted by Manooj Murali on 01-Oct-2014 03:46

Hi Naresh,

Just one question - Could you point me to the documentation which says "Pattern uses the same conventions as Java SimpleDateFormat class."

-Thanks

Posted by pvorobie on 01-Oct-2014 11:33
Posted by Manooj Murali on 01-Oct-2014 11:49

the link you gave points to rbv_api.formatDate... my point is does it say anywhere that rbf_formatDate should support SimpleDateformat..? (I do not believe it does).

I am working on fixing this issue anyway but would like to make sure that I am not missing anything.

-Thanks

Posted by pvorobie on 01-Oct-2014 12:13

Client-side API is implemented on JavaScript and  has no knowledge of Java classes. For that reason it may behave differently from similar server-side API.

Posted by Manooj Murali on 01-Oct-2014 14:04

Well, yes.. that was exactly my point. But, since we are on this now, it would be better to make an attempt to get them in sync.

This thread is closed