Methods
Public Class methods
[ show source ]
# File lib/texp/day_of_month.rb, line 5 5: def initialize(days) 6: @days = listize(days) 7: end
Public Instance methods
Encode the temporal expression into codes.
[ show source ]
# File lib/texp/day_of_month.rb, line 21
21: def encode(codes)
22: encode_list(codes, @days)
23: codes << encoding_token
24: end
Is date included in the temporal expression.
[ show source ]
# File lib/texp/day_of_month.rb, line 10
10: def includes?(date)
11: @days.include?(date.day)
12: end
Human readable version of the temporal expression.
[ show source ]
# File lib/texp/day_of_month.rb, line 15
15: def inspect
16: "the day of the month is the " +
17: ordinal_list(@days)
18: end