Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xronos-calendar

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xronos-calendar

This is the calendar service for xronos

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
212
decreased by-76.68%
Maintainers
1
Weekly downloads
 
Created
Source

Synopsis

This is the calendar part of the Xronos package - a time aware financial database

Code Example

import { Log } from "fme-logger";
var L = new Log("Test Calendar");
import * as mongo from "mongodb";

import { CalendarDay } from "xronos-calendar";

var mongoURL = 'mongodb://localhost:27017/xronos'

mongo.MongoClient.connect(mongoURL, async (err, db) => {
    L.info("database connected:",mongoURL);
 
    var dayGenerator = new CalendarDay(db);
    var rtn = await dayGenerator.create.init();
    var day = await dayGenerator.create.generate(new Date());
  
})

Motivation

The package generates a holdiay database from 1980 to 2040, from there passed a date it creates a day object that includes elections and holidays and options expiration information.

Installation

npm install --save xronos-calendar

API Reference

export class Day {
    _id?: string;
    timestamp: Date;
    YYYYMMDD: string;
    month: number;
    year: number;
    dow: number;
    doy: number;
    doyISO:number;
    doq: number;
    woy: number;
    woyISO:number;
    quarter: number;
    opex:Opex;
    lunar:Lunar;
    politics: Politics;
    holidays : HolidayDay[];
   
    constructor() {
    }
   
}

Tests

Describe and show how to run the tests with code examples.

Contributors

FortunesRocks.me LLC contact me there if you have questions;

License

MIT

FAQs

Package last updated on 10 Nov 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc