![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@financial-times/ft-date-format
Advanced tools
Readme
ft-date-format provides javascript utilities for formatting and updating dates in FT style.
Returns a date formatted as a string
date
: A javascript Date
object or a valid string to pass to the Date
constructortpl
: A string specifying what format to output the date in:
'datetime'
: formats the date in the standard FT long format, including the time. E.g. May 15, 2014 8:10 am
'date'
: formats the date in the standard FT long format. E.g. May 15, 2014
./main.js
for an up to date list of supported formats. To avoid e.g. the mm
in common
being replaced with the month prefix with a double backslash co\\mmon
i.e. In most cases custom date formats should not be used, in favour of the standard FT date and datetime formatsReturns the relative time since the given date, formatted as a human readable string e.g. 13 minutes ago
.
Returns relative time or timestamp for a given date, in accordance with FT date formatting conventions.
date
: A javascript Date
object or a valid string to pass to the Date
constructorReturns 'yesterday'
, 'today'
or ''
for a given date. You can request this formatting for ft-date-format
components by adding data-ft-date-format-format="today-or-yesterday-or-nothing"
.
date
: A javascript Date
object or a valid string to pass to the Date
constructorState | Major Version | Last Minor Release | Migration guide |
---|---|---|---|
✨ active | 2 | N/A | migrate to v2 |
⚠ maintained | 1 | 1.0.5 | - |
If you have any questions, comments, or need help using ft-date-format, please either raise an issue, visit #ft-origami or email Origami Support.
This software is published by the Financial Times under the MIT licence.
FAQs
Utility for formatting and updating dates for Financial-Times customer-facing products
The npm package @financial-times/ft-date-format receives a total of 2,826 weekly downloads. As such, @financial-times/ft-date-format popularity was classified as popular.
We found that @financial-times/ft-date-format demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.