
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@rnwonder/simple-datejs
Advanced tools
A light weight simple date management library
npm i @rnwonder/simple-datejs
yarn add @rnwonder/simple-datejs
pnpm add @rnwonder/simple-datejs
import { DateMath, utils } from "@rnwonder/simple-datejs";
const today = new Date();
const isToday = utils.checkIfItsTodayDate(today); // ✅ true
const date1 = DateMath.set("2018-03-13");
const date2 = DateMath.set("2017-02-13");
date1.diff(date2); // { "milliseconds": 33955200000 }
date1.diff(date2, ["days", "year"]); // { "days": 393, "years": 1.0833333333333333 }
const date = { month: 1, day: 14, year: 2023 };
DateMath.set(date).plus({ day: 2 }).toObject(); // { "day": 16, "month": 1, "year": 2023 }
DateMath.set(date).plus({ day: 2 }).toISO(); // 2023-02-15T23:00:00.000Z
DateMath.set(date).plus({ hour: 24, minute: 1440 }).toMillis(); // 1676502000000
DateMath.set(date).plus({ day: 2 }).toJSDate(); // Date
DateMath.set(date).plus({ day: 2 }).toString(); // Feb 16, 2023
DateMath.set(date)
.plus({ second: 86400 })
.toString({ format: "DDD, MMM dd yyyy" }); // Wednesday, February 15 2023
DateMath.set(date)
.minus({
year: 2,
month: 2,
day: 2,
hour: 24,
minute: 1440,
second: 86400,
})
.toString({
localeOptions: { dateStyle: "full" },
}); // Wednesday, December 9, 2020
import DateMath from "@rnwonder/simple-datejs/dateMath";
import utils from "@rnwonder/simple-datejs/utils";
import { checkIfItsTodayDate } from "@rnwonder/simple-datejs/utils";
FAQs
Light weight date management library
The npm package @rnwonder/simple-datejs receives a total of 1,906 weekly downloads. As such, @rnwonder/simple-datejs popularity was classified as popular.
We found that @rnwonder/simple-datejs demonstrated a healthy version release cadence and project activity because the last version was released less than 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 researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.