34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/l43/time/to_time.rb', line 34
def help_str_to_time(indent: 3, name_col: :blue, val_col: [:bold, :magenta])
[
[:bold, "the following formats of the parameter to ", name_col, "str_to_time", :reset, :bold,
" are translated as follows to ", name_col, "Time ", :reset, :bold, "objects", :reset, nil],
[1, :bold, "Absolute dates", :reset],
[2, "14 digits", :dim, " to YYYYMMDDhhmmss"],
[2, "12 digits", :dim, " to YYMMDDhhmmss"],
[2, "6 digits", :dim, " to YYMMDD000000"],
[2, "4 digits", :dim, " to MMDD000000"],
[2, "2 digits", :dim, " to DD000000"],
[2, val_col, "'today'", :reset, :dim, " to midnight of current date"],
[2, val_col, "'yesterday'|'yd'", :reset, :dim, " to midnight of yesterday"],
"",
[1, :bold, "Relative times"],
[2, val_col, "'-3d2h40s'", :reset, :dim, " 3 days 2 hours and 40 seconds before now"],
[2, val_col, "'10m4s'", :reset, :dim, " 10 minuyes 4 seconds after now"],
].map { [indent, *it, :reset, nil] }
end
|