Advanced date sorting - Cloud

Overview

The support for Date type date sorting is built in which includes multiple language support and does not require any additional server installation. This is the recommended type to use for date sorting.

Acknowledgement

Advanced date sorting support with the Date column type is provided using JavaScript implemented with the help of the Moment.js library (open source, MIT license). A summary of the relevant parts of the Moment.js documentation is repeated here.

Automatic support

If the Date column type is specified, the default date parsing recognizes a number of common date formats including those recognized through the browser specific JavaScript implementation. However, there may be browser specific inconsistencies. The following ISO-8601 formats are recognized consistently across browsers:

User specified formats

Specify a format string following the Date column type to handle a specific date format. Construct the date format string from the set of format tokens.

Non-alphanumeric characters

Non-alphanumeric characters are ignored, so, for example, both of the following are treated the same using the MM-DD-YYYY format:

12-25-1995
12/25/1995

Similarly, formats can be specified with or with non-alphanumeric separators. However, using separators helps with readability.

Format tokens

(info) See the Moment.js documentation for further information.

TokenDescription
M, MMMonth Number (1 - 12)
MMM, MMMMMonth Name (In the current language)
D, DDDay of month
DDD, DDDDDay of year
d, dd, ddd, dddd

Day of week

The input for these tokens is ignored as there are 4-5 weeks in a month and it would be impossible to get the day of the month based off the day of the week.

YY2 digit year (if greater than 68, it returns 1900's, otherwise 2000's)
YYYY4 digit year
a, AAM/PM
H, HH24 hour time
h, hh12 hour time (use in conjunction with a or A)
m, mmMinutes
s, ssSeconds
SDeciseconds (1/10th of a second)
SSCentiseconds (1/100th of a second)
SSSMilliseconds (1/1000th of a second)
Z, ZZTimezone offset as +07:00 or +0700
XUnix timestamp

Language support (i18n)

When the date format contains national language words, the appropriate language needs to be indicated. English (US) is the default, if nothing is specified. Specify the language between the date indicator M and the format string.

For example:  (de)YYYY-MMM-DD for a German date like 2013-Mrz-10

(fr) for a French date like Janv 10, 2013

Supported languages

Click the relevant link from the following list of Moment.js library supported languages to get the details of the specific localization:

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2024 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.