Sha256: bedf216efacef5b7a85a85acc20d99248e2d91dbfb8ad36b0d93d781eebc49f2

Contents?: true

Size: 781 Bytes

Versions: 10

Compression:

Stored size: 781 Bytes

Contents

# -*- encoding: utf-8 -*-
# -*- frozen_string_literal: true -*-
# -*- warn_indent: true -*-

UnitMeasurements::Time = UnitMeasurements.build do
  si_unit :s, aliases: [:sec, :second, :seconds]

  unit :h, value: "60 min", aliases: [:hr, :hour, :hours]
  unit :d, value: "24 h", aliases: [:day, :days]
  unit :wk, value: "7 d", aliases: [:week, :weeks]
  unit :fn, value: "2 wk", aliases: [:"4tnite", :fortnight, :fortnights]
  unit :mo, value: "30.4167 d", aliases: [:month, :months]
  unit :yr, value: "365 d", aliases: [:y, :year, :years]
  unit :min, value: "60 s", aliases: [:minute, :minutes]
  unit :qtr, value: "3 mo", aliases: [:quarter, :quarters]
  unit :dec, value: "10 y", aliases: [:decade, :decades]
  unit :cent, value: "10 dec", aliases: [:century, :centuries]
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
unit_measurements-3.2.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-3.1.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-3.0.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.6.2 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.6.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.5.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.4.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.3.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.2.0 lib/unit_measurements/unit_groups/time.rb
unit_measurements-2.1.0 lib/unit_measurements/unit_groups/time.rb