Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Using this class you will be able to convert dates between 3 different calendars
These are 3 available calendar contexts in this project. Now let's move into the code itself.
The base logic is to use date conversion methods to convert a given date to Julian Day Number, so it can be converted to the desired calendar later.
This is the default constructor that doesn't take any arguments and will get current date as its date. Note: The default calendar will be 'gregorian' in this constructor.
const daxte = new Daxte();
This constructor will take a Date object as its only parameter and uses it for conversion. Note: The calendar will be 'gregorian' in this constructor.
const date = new Date(2020, 10, 7);
const daxte = new Daxte(date);
In this constructor you can pass date in order of Year, Month, Day to use it for conversion. Note: You need to specify the calendar of the specified date, otherwise it uses 'gregorian' as default.
let daxte = new Daxte(1998, 1, 18);
let daxte = new Daxte(1376, 10, 28, 'jalali');
This method will return the julian day number of the instance
These three methods are same as to method. They are named for an easier and meaningful usage.
{
year: 2020,
month: 10,
day: 7,
isLeapYear: true,
lastDayInMonth: 31
}
This method will return the date in the specified calendar
FAQs
Date converter for different calendars
The npm package daxte receives a total of 2 weekly downloads. As such, daxte popularity was classified as not popular.
We found that daxte 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.