这是indexloc提供的服务,不要输入任何密码
Skip to content

Add timestampDifference utility snippet #2121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tanvisandbhor
Copy link

This PR adds a new JavaScript snippet named timestampDifference that returns the difference in seconds between two timestamps. It uses Math.abs() to ensure a positive value regardless of the order of inputs.

Example:
timestampDifference(1650000000000, 1650000003000); // 3

@github-actions github-actions bot added snippet Related to snippets. content Changes to content. labels Jul 22, 2025
@Chalarangelo Chalarangelo added invalid Not an issue. and removed snippet Related to snippets. content Changes to content. labels Jul 23, 2025
@Chalarangelo
Copy link
Owner

Thanks but I'm not accepting content contributions at this time.

Repository owner locked as off-topic and limited conversation to collaborators Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid Not an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants