Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
jalali-convertor
Advanced tools
fastest javascript functions for converting Jalaali (Jalali, Persian, Khayyami, Khorshidi, Shamsi) and Gregorian calendar systems to each other.
fastest javascript functions for converting Jalaali (Jalali, Persian, Khayyami, Khorshidi, Shamsi) and Gregorian calendar systems to each other.
const date = require("jalali-convertor")
// get curent date
console.log(date.jDate()); // [ 1402, 3, 4 ]
console.log(date.gDate()); // [ 2023, 5, 25 ]
// get curent timestamp
console.log(date.jTime()); // 1685018686260
console.log(date.gTime()); // 1685018686261
console.log(new Date(date.jTime())); // 2023-05-25T12:44:46.262Z UTC
console.log(new Date(date.gTime())); // 2023-05-25T12:44:46.262Z UTC
// get specific date
console.log(date.jDate(1685014909046)); // [ 1402, 3, 4 ]
console.log(date.gDate(1685014909046)); // [ 2023, 5, 25 ]
// get specific timestamp
console.log(date.jTime(1402, 3, 4)); // 1684960200000
console.log(date.gTime(2023, 5, 25)); // 1684960200000
console.log(new Date(date.jTime(1402, 3, 4))); // 2023-05-24T20:30:00.000Z UTC
console.log(new Date(date.gTime(2023, 5, 25))); // 2023-05-24T20:30:00.000Z UTC
// get specific timestamp at 13:30 in your time zone
console.log(date.jTime(1402, 3, 4, 13, 30)); // 1685008800000
console.log(date.gTime(2023, 5, 25, 13, 30)); // 1685008800000
console.log(new Date(date.jTime(1402, 3, 4, 13, 30))); //2023-05-25T10:00:00.000Z UTC
console.log(new Date(date.gTime(2023, 5, 25, 13, 30))); //2023-05-25T10:00:00.000Z UTC
// convert date
console.log(date.j2g(1402, 3, 4)); // [ 2023, 5, 25 ]
console.log(date.g2j(2023, 5, 25)); // [ 1402, 3, 4 ]
FAQs
fastest javascript functions for converting Jalaali (Jalali, Persian, Khayyami, Khorshidi, Shamsi) and Gregorian calendar systems to each other.
We found that jalali-convertor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.