Coder Social home page Coder Social logo

simpledate.jl's Introduction

Dates and Times for Julia

The types and functions in this class store and manipulate representations of dates and times Instances are stored internally as a Julian Date (jd), which is a representation of dates counting linearly in days since midnight localtime on January 1, 4713 BCE. The original Julian Day Number, counting in days since noon GMT, is refered to as the astronomical julian date (ajd) within this code base.

Only minimal timezone support currently exists. DateTime objects keep track of timezones supplied, and use timezones  in difference calculations. However, no timezone conversion functionality is provided. DST is also not considered by this code. Both these items are cosidered to be the responsibility of the calling code.

##Examples

load("SimpleDate/src/SimpleDate")
using SimpleDate

d = datetime(2012, 4, 24, 13,10,5) 
@assert hour(d) == 13
@assert minute(d)==10
@assert second(d) == 5
@assert mday(d) == 24
@assert month(d) == 4
@assert year(d) == 2012

d = date(2012,2,1)
@assert year(d) == 2012
@assert month(d) == 2
@assert mday(d) == 1
@assert wday(d) == 4 #Wednesday

EXPERIMENTAL!! USE AT OWN RISK.

simpledate.jl's People

Contributors

aviks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.