YouTrack Standalone 2018.3 Help

Date Formats

The page describes a read-only resource that lets you read the list of date formats that are supported by YouTrack server.

Resource

/api/admin/settings/dateFormats

Returned entity

DateFormatDescriptor. For the description of the entity attributes, see the Supported Fields section.

Supported methods

Supported Fields

This table describes attributes of the returned entity.

  • To receive an attribute in the response from server, specify it explicitly in the fields parameter of a request.

Field

Type

Description

dateNoYearPattern

string

A pattern for a date presentation without a year.

datePattern

string

A pattern for a date presentation.

monthPattern

string

A pattern for a month presentation.

pattern

string

A complete date presentation pattern.

presentation

string

Text presentation of the date format in the UI.

id

string

A unique entity ID.

Get a Date Formats List

Request syntax

GET /api/admin/settings/dateFormats[?{fields}&{$top}&{$skip}]

Reequest parameters

Parameter

Type

Description

fields

string

A list of DateFormatDescriptor entity attributes that should be returned in the response. If no fields specified, only entity ID is returned.

$skip

int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

int

Optional. Lets you specify the maximum number of entries that are returned in the response.

Sample request

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/settings/dateFormats?fields=id,presentation,datePattern,pattern,dateNoYearPattern,monthPattern&$top=3' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache'

Sample response body

In a response to such sample request, you receive a list of the first three supported date format entities with all their attributes:

[ { "datePattern": "dd/MM/yy", "presentation": "Short date DD/MM/YY with time (31/12/00 23:59)", "dateNoYearPattern": "dd/MM", "monthPattern": "MM/yy", "pattern": "dd/MM/yy HH:mm", "id": "youtrack.datefieldformat.short_dayfirst_with_time" }, { "datePattern": "MM/dd/yy", "presentation": "Short date MM/DD/YY with time (12/31/00 23:59)", "dateNoYearPattern": "MM/dd", "monthPattern": "MM/yy", "pattern": "MM/dd/yy HH:mm", "id": "youtrack.datefieldfromat.short_monthfirst_with_time" }, { "datePattern": "d MMM yyyy", "presentation": "Medium date with time (31 Dec 2000 23:59)", "dateNoYearPattern": "d MMM", "monthPattern": "MMM yyyy", "pattern": "d MMM yyyy HH:mm", "id": "youtrack.datefieldformat.medium_with_24h" } ]
Last modified: 7 March 2019