Simple value class for keeping track of precisioned dates
Minimun values that precisioned fields get set to
String values for display
Some constants w/arbitrary integer values used internally for comparisions
# File lib/runt/dprecision.rb, line 92 def Precision.day new(DAY_PREC) end
# File lib/runt/dprecision.rb, line 96 def Precision.hour new(HOUR_PREC) end
# File lib/runt/dprecision.rb, line 108 def Precision.millisec new(MILLI_PREC) end
# File lib/runt/dprecision.rb, line 100 def Precision.min new(MIN_PREC) end
# File lib/runt/dprecision.rb, line 84 def Precision.month new(MONTH_PREC) end
# File lib/runt/dprecision.rb, line 116 def initialize(prec) @precision = prec end
# File lib/runt/dprecision.rb, line 104 def Precision.sec new(SEC_PREC) end
# File lib/runt/dprecision.rb, line 88 def Precision.week new(WEEK_PREC) end
# File lib/runt/dprecision.rb, line 80 def Precision.year new(YEAR_PREC) end
# File lib/runt/dprecision.rb, line 120 def <=>(other) self.precision <=> other.precision end
# File lib/runt/dprecision.rb, line 124 def ===(other) self.precision == other.precision end
# File lib/runt/dprecision.rb, line 132 def label LABEL[@precision] end
# File lib/runt/dprecision.rb, line 112 def min_value() FIELD_MIN[@precision] end
# File lib/runt/dprecision.rb, line 128 def to_s "DPrecision::#{self.label}" end