goldbo / year

Year as a Service

Home Page:https://raw.github.com/asgrim/year/master/en/currentYear

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YaaS

Year as a Service. Provides the current year as a service.

Examples

PHP

<?php
$year = file_get_contents('https://raw.github.com/asgrim/year/master/en/currentYear');

echo $year; // 2014

Ruby

require 'net/http'
year = Net::HTTP.get_response(URI.parse("https://raw.github.com/asgrim/year/master/en/currentYear")).body
p year # 2014

Python

import urllib2
year = urllib2.urlopen('https://raw.github.com/asgrim/year/master/en/currentYear').read(1000).strip()
print year; # 2014

BC Break

In the future, we may have to break BC by removing the root "currentYear". You should use "en/currentYear" instead.

Internationalisation (i18n)

YaaS also supports the following calendars:

Hebrew (he):

Chinese (zh-cn):

About

Year as a Service

https://raw.github.com/asgrim/year/master/en/currentYear

License:MIT License