
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
fancy-timestamp
Advanced tools
#Fancy Timestamp
Use this to create natural language for your unix timestamps (similar to Facebook's)
Plays well with browserify
#Usage Install with NPM and require where needed.
npm install fancy-timestamp
var fancyTimestamp = require('fancy-timestamp');
Fancy Timestamp can accept normal timestamps composed of seconds.
var normalTimestamp = 1342123755; //Using only seconds
var fancyTimestampString = fancyTimestamp(normalTimestamp); // result == "8 minutes ago"
It can also accept timestamps composed of milliseconds such as the ones JavaScript defaults to. To parse millisecond timestamps pass a second parameter of 'true'.
var javascriptTimestamp = (new Date()).getTime(); //Using JavaScript's timestamp composed of milliseconds
fancyTimestampString = fancyTimestamp(javascriptTimestamp, true); // result == "Just now"
Where appropriate, fancy-timestamp will apply the appropriate ending to the natural language text such as 'tomorrow' or 'away' for dates in the future, and 'yesterday' or 'ago' for dates in the past.
#License MIT license
FAQs
Create natural language from UNIX timestamps
We found that fancy-timestamp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.