Skip to content
coffeetalkh edited this page Aug 6, 2015 · 6 revisions

What we need?

Datium is calendar which is designed to be the responsible and smart about what we do with date and time, so we trying to create it step by step by this temporary wiki. this document is not for who want just use datium as a library, it's just for developers on this project.

add()

This method is for add some date/time to created date object, you can add date/time by following structure.

parameter example
hour 1 hour
second 5 second
minute 6 minute
day 7 day
week 1 week
month 4 month
year 2 year
century 4 century

example

Datium::now()->add('1 day')->get(); // if now is Farvardin 13, 1394 00:12:56

Then the output should be something be equal with this.

Output => Farvardin 15, 1394 00:12:56

sub()

get()

Calendar type

This calendar output should be compatible with Iran and Afghanistan Shamsi calendar also should have output in Jalali calendar, this is output month in this 3 calenders.

| Month number | Shamsi in Iran | Shamsi in Afghanistan | Season | gregorian |---|---|---|---| | 1 | Farvardin - فروردین | Haml - حمل | Spring | 21 March - 20 April | | 2 | Ordibehesht - ادیبهشت | Sawr - ثور | Spring | 21 April - 21 May | | 3 | khordad - خرداد | Jawza - جوزا | Spring | 22 May - 21 Jun | | 4 | Tir - تیر | Saratan - سرطان | Summer | 22 Jun - 22 July | 5 | Mordad - مرداد | Asad - اسد | Summer | 23 July - 22 August | | 6 | Shahrivar - شهریور | Sonbole - سنبل | Summer | 23 August - 22 September | | 7 | Mehr - مهر | Mizan - میزان | Fall | 23 September - 22 October | | 8 | Aban - آبان | Aqrab - عقرب | Fall | 23 October - 21 November | | 9 | Azar - آذر | Quws - قوس | Fall | 22 November - 21 December | | 10 | Dey - دی | Jadi - جدی | Winter | 22 December - 20 January | | 11 | Bahman - بهمن | Dollo - دلو | Winter | 21 January - 19 February | | 12 | Esfand - اسفند | Hoot - حوت | Winter | 20 February - 20 March

Clone this wiki locally