#291 First day of week

open
nobody
engine (144)
5
2013-06-27
2013-06-27
No

I've noticed that in HSQLDB the first day of the week is always sunday, regardless of the JVM locale.
This applies to the function DAYOFWEEK and also to TRUNC when using the WW option.
Is there a way to change this behavior?
If not, I think the default behavior should be changed. In fact according to ISO standards the first day of week is monday.
Thank you.

Discussion

  • Fred Toussi

    Fred Toussi - 2013-06-27

    You cannot change the first day of the week. No change is planned for the near future. You can write your own functions to support an alternative day.

     
  • Paolo Bassino

    Paolo Bassino - 2013-06-28

    Thank you for your fast reply.
    We really think this should be changed, because this setting isn't following the ISO standard and can cause inconsistencies between what is returned by the database and what is returned by Java functions (for example the very popular Joda Time library).

     
  • Fred Toussi

    Fred Toussi - 2013-06-28

    Java returns Sunday or Monday depending on the locale. We chose Sunday as the most appropriate for many of our users.

     
  • Paolo Bassino

    Paolo Bassino - 2013-06-28

    Then I think you should describe this in the documentation, informing developers that some date function will work as expected only for American users.

     
  • Fred Toussi

    Fred Toussi - 2013-06-28

    OK. Here is my suggestion. You organise the translation of the HSQLDB 2.x error messages into at least one language in a locale that has Monday as the first day of the week, and I will provide an option for this.

    The only translation currently available for 2.x is Spanish. Translations for several languages exist for the 1.8.x messages.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks