Module: Chronos::Numeric::Gregorian

Included in:
Numeric
Defined in:
lib/chronos/numeric/gregorian.rb

Instance Method Summary collapse

Instance Method Details

#centuries(language) ⇒ Object Also known as: century

Get a duration of the receivers amount of centuries



90
91
92
# File 'lib/chronos/numeric/gregorian.rb', line 90

def centuries(language)
	::Chronos::Duration::Gregorian.new(self*1200, 0, 0, language)
end

#days(language) ⇒ Object Also known as: day

Get a duration of the receivers amount of days



60
61
62
# File 'lib/chronos/numeric/gregorian.rb', line 60

def days(language)
	::Chronos::Duration::Gregorian.new(0, self, 0, language)
end

#decades(language) ⇒ Object Also known as: decade

Get a duration of the receivers amount of decades



84
85
86
# File 'lib/chronos/numeric/gregorian.rb', line 84

def decades(language)
	::Chronos::Duration::Gregorian.new(self*144, 0, 0, language)
end

#hours(language) ⇒ Object Also known as: hour

Get a duration of the receivers amount of hours



54
55
56
# File 'lib/chronos/numeric/gregorian.rb', line 54

def hours(language)
	::Chronos::Duration::Gregorian.new(0, 0, self*::Chronos::PS_IN_HOUR, language)
end

#microseconds(language) ⇒ Object Also known as: microsecond

Get a duration of the receivers amount of microseconds



30
31
32
# File 'lib/chronos/numeric/gregorian.rb', line 30

def microseconds(language)
	::Chronos::Duration::Gregorian.new(0, 0, self*::Chronos::PS_IN_MICROSECOND, language)
end

#milliseconds(language) ⇒ Object Also known as: millisecond

Get a duration of the receivers amount of milliseconds



36
37
38
# File 'lib/chronos/numeric/gregorian.rb', line 36

def milliseconds(language)
	::Chronos::Duration::Gregorian.new(0, 0, self*::Chronos::PS_IN_MILLISECOND, language)
end

#minutes(language) ⇒ Object Also known as: minute

Get a duration of the receivers amount of minutes



48
49
50
# File 'lib/chronos/numeric/gregorian.rb', line 48

def minutes(language)
	::Chronos::Duration::Gregorian.new(0, 0, self*::Chronos::PS_IN_MINUTE, language)
end

#months(language) ⇒ Object Also known as: month

Get a duration of the receivers amount of months



72
73
74
# File 'lib/chronos/numeric/gregorian.rb', line 72

def months(language)
	::Chronos::Duration::Gregorian.new(self, 0, 0, language)
end

#nanoseconds(language) ⇒ Object Also known as: nanosecond

Get a duration of the receivers amount of nanoseconds



24
25
26
# File 'lib/chronos/numeric/gregorian.rb', line 24

def nanoseconds(language)
	::Chronos::Duration::Gregorian.new(0, 0, self*::Chronos::PS_IN_NANOSECOND, language)
end

#picoseconds(language) ⇒ Object Also known as: picosecond

Get a duration of the receivers amount of picoseconds



18
19
20
# File 'lib/chronos/numeric/gregorian.rb', line 18

def picoseconds(language)
	::Chronos::Duration::Gregorian.new(0, 0, self, 0, language)
end

#seconds(language) ⇒ Object Also known as: second

Get a duration of the receivers amount of seconds



42
43
44
# File 'lib/chronos/numeric/gregorian.rb', line 42

def seconds(language)
	::Chronos::Duration::Gregorian.new(0, 0, self*::Chronos::PS_IN_SECOND, language)
end

#weeks(language) ⇒ Object Also known as: week

Get a duration of the receivers amount of weeks



66
67
68
# File 'lib/chronos/numeric/gregorian.rb', line 66

def weeks(language)
	::Chronos::Duration::Gregorian.new(0, self*7, 0, language)
end

#years(language) ⇒ Object Also known as: year

Get a duration of the receivers amount of years



78
79
80
# File 'lib/chronos/numeric/gregorian.rb', line 78

def years(language)
	::Chronos::Duration::Gregorian.new(self*12, 0, 0, language)
end