Sha256: 42f1620594e3ac42cfced99341a65e36487e561620aed5c2a6f32f99459ea337

Contents?: true

Size: 1.35 KB

Versions: 65

Compression:

Stored size: 1.35 KB

Contents

%%{
  # RFC 5322 Internet Message Format
  # Section 3.3. Date and Time Specification
  # https://tools.ietf.org/html/rfc5322#section-3.3
  machine rfc5322_date_time;
  alphtype int;

  include rfc5322_lexical_tokens "rfc5322_lexical_tokens.rl";

  # day_of_week
  day_name = "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | "Sun";
  obs_day_of_week = CFWS? day_name CFWS?;
  day_of_week = (FWS? day_name) | obs_day_of_week;

  # date
  obs_day = CFWS? (DIGIT | (DIGIT DIGIT)) CFWS?;
  day = (FWS? DIGIT DIGIT? FWS) | obs_day;
  month = "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec";
  obs_year = CFWS? (DIGIT DIGIT DIGIT*) CFWS?;
  year = FWS DIGIT DIGIT DIGIT DIGIT FWS | obs_year;
  date = day month year;

  # time
  obs_hour = CFWS? (DIGIT DIGIT) CFWS?;
  hour = DIGIT DIGIT | obs_hour;
  obs_minute = CFWS? (DIGIT DIGIT) CFWS?;
  minute = DIGIT DIGIT | obs_minute;
  obs_second = CFWS? (DIGIT DIGIT) CFWS?;
  second = DIGIT DIGIT | obs_second;
  obs_zone = "UT" | "GMT" | "EST" | "EDT" | "CST" | "CDT" | "MST" | "MDT" | "PST" | "PDT" | 0x41..0x49 | 0x4B..0x5A | 0x61..0x69 | 0x6B..0x7A;
  time_of_day = hour ":" minute (":" second)?;
  zone = FWS ((("+" | "-") DIGIT DIGIT DIGIT DIGIT) | obs_zone);
  time = time_of_day zone;

  date_time = (day_of_week ",")?
              (date >date_s %date_e) <: (time >time_s %time_e) CFWS?;
}%%

Version data entries

65 entries across 50 versions & 14 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/mail-2.8.1/lib/mail/parsers/rfc5322_date_time.rl
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/mail-2.7.1/lib/mail/parsers/rfc5322_date_time.rl
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/mail-2.7.1/lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.1 lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.1.rc2 lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.0.1 lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.0.1.rc1 lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.0 lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.0.rc3 lib/mail/parsers/rfc5322_date_time.rl
mail-2.8.0.rc2 lib/mail/parsers/rfc5322_date_time.rl
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parsers/rfc5322_date_time.rl
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parsers/rfc5322_date_time.rl
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/mail-2.7.1/lib/mail/parsers/rfc5322_date_time.rl