No announcement yet.
  • Filter
  • Time
Clear All
new posts

  • Isomorphic
    We've documented DateUtil.getDayNames() and corrected the framework default value for dayNames, which did indeed have 8 entries (since 2013!) - however, note that dayNames should never be set to 8 entries at runtime, because the framework should always load a locale, and the locale files set it to an array of 7 values.

    Leave a comment:

  • isc.DateUtil.dayNames array has 8 entries? Sunday is duplicated.

    UPDATE to the original posting below:

    OK, so we discovered that we can achieve the behaviour that we wanted, including ui language translation, by calling the function:

    So, the only issue here is that isc.DateUtil.getDayNames() is not documented in the Reference but using the dayNames array directly is documented, see:

    Ideally, the Reference could be updated but that's a just a little detail.


    Version v13.0p_2023-12-06/LGPL Development Only (2023-12-06)
    Line: 22204
    dayNames: ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
    The isc.DateUtil.dayNames array has 8 entries? Sunday is duplicated.

    Is this in error or "by design"?

    These names also remain in English, even when the SmartClient UI is running under another language (ie when other descriptors in the SmartClient library are showing in a different language). Again, is this as expected?

    We have some custom functionality showing a days-of-the-week selector, so it would be neat and tidy to use dayNames for that.

    Many thanks

    Last edited by DaveC; 31 May 2024, 05:43. Reason: We have found a solution to the problem ourselves, using the un-documented isc.DateUtil.getDayNames()