Giter VIP home page Giter VIP logo

ddatee's Introduction

ddatee

An erlang implementation of the discordian calendar.

This works by converting a date tuple {Year, Month, Day} to a discordian date tuple {Yold, Season, Day} and provide functions for formatting.

Usage

Convert a date to ddate

Ddate = ddatee:date_to_ddate({2017, 5, 26}).

This should result in the tuple {3183, 2, 73} which can then be converted in a string by using

ddatee:format(Ddate).

Which results in

"Sweetmourn, the 73rd day of Discord in the YOLD 3183"

Built in templates

Ddatee ships with two formatting templates included: short and full.

While full mimics the output of the original ddate for the current date, short acts like running ddate with a given date, (e.g. "Sweetmorn, Discord 73, 3183 YOLD").

Custom formats

You can provide a custom format string. ddatee:format defaults to full which expands to

":weekday:, the :day::day_suffix: day of :season: in the YOLD :yold::celebration:"

The supported format tags are:

:day:      
:day_suffix:
:season:
:yold:  
:weekday:  
:season:    
:celebration:

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.