![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
gdate-julian
Advanced tools
Readme
Port of GLib functions to work with julian days, to convert between it and gregorian date. Library was initially developed to help a sister library node-xhb work with file generated by HomeBank
npm install gdate-julian
Import ESM style
import {g_date_to_julian_days, g_julian_days_to_date} from 'gdate-julian'
or CJS Style
const {g_date_to_julian_days, g_julian_days_to_date} = require('gdate-julian')
each method is also exported as camelCase
alias:
import {gDate2JulianDays, gJulianDays2Date} from 'gdate-julian'
or CJS Style
const {gDate2JulianDays, gJulianDays2Date} = require('gdate-julian')
Here we show small example how to convert between Gregorian Date and Julian Days
More detailed examples can be found in tests in ./src/__tests__/g_date_conversion_spec.js
const julianDays = gDate2JulianDays(new Date('1900-01-01T12:00:00Z'))
console.log(julianDays) // outputs 693596
const gregorianDate = gJulianDays2Date(693596)
console.log(gregorianDate) // outputs 1900-01-01T12:00:00Z
Project also includes type definitions for TypeScript in ./src/index.d.ts
export type g_date_is_leap_year = (year: number) => boolean;
export type g_julian_days_to_date = (julian_days: number) => Date;
export type g_date_to_julian_days = (date: Date) => number;
The code provided here is based off GLib codebase, hence licenced under same LGPL.
FAQs
Converts date to and from julian days in gLib GDate style
The npm package gdate-julian receives a total of 1 weekly downloads. As such, gdate-julian popularity was classified as not popular.
We found that gdate-julian 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.