Come build with us.
Stacks API v13 for Stacks 5.0
%id=dateID%
%id=<dateControlID>%
%id=<dateControlID> -format="<format>" %
%id=<dateControlID> -dateStyle="<short, medium, long, or full>" %
%id=<dateControlID> -timeStyle="<short, medium, long, or full>" %
<dateControlID>
is the ID of a date control.<format>
a Unicode Date Standard 35 format. There is a practical guide to these formats here: https://waracle.com/iphone-nsdateformatter-date-formatting-table/<short, medium, long, or full>
select a specific pre-formatted date that is localized to user’s current macOS settings.Output a long format full date/time string that is compatible with Moment.js (the default), a localized date or time style, or a specified date format.
Note: date controls have been available since API v5, however the format and style parameters were introduced in API v10
template:
The UNIX date is: %id=dateProperty%
The UNIX date is: 2017-06-27T18:48:09CDT
template:
The time is: %id=dateProperty -timeStyle="short"%
The time is: 7:25 PM
This is in the US. In other locales it will appear formatted for that region.
template:
The date is: %id=dateProperty -dateStyle="full"%
The date is: Tuesday, June 27, 2017
This is in the US. In other locales it will appear formatted for that region.
template:
It is %id=dateProperty -timeStyle="long"% on %id=dateProperty -dateStyle="short"%
It is 6:48:09 PM CDT on 6/27/17
template:
This is the year %id=dateProperty -format="yyyy"%.
This is the year 2017.