lib/edtf/date.rb
def prev(n = 1)
    if n > 1
      1.upto(n).map { |by| advance(PRECISIONS[precision] => -by) }
    else
      advance(PRECISIONS[precision] => -1)
    end
  end
# Returns the Date of the previous day, month, or year depending on the
# current Date/Time's precision.
Returns the Date of the previous day, month, or year depending on the
current Date/Time's precision.
Returns the Date of the previous day month or year depending on the current Date / Time ' s precision .
def prev(n = 1)
    if n > 1
      1.upto(n).map { |by| advance(PRECISIONS[precision] => -by) }
    else
      advance(PRECISIONS[precision] => -1)
    end
  end
def prev ( n = 1 ) if n > 1 1 . upto ( n ) . map { | by | advance ( PRECISIONS [ precision ] => - by ) } else advance ( PRECISIONS [ precision ] => - 1 ) end end
Returns the Date of the previous day, month, or year depending on the
current Date/Time's precision.
Returns the Date of the previous day month or year depending on the current Date / Time ' s precision .
n