Method: RubyXL::NumberFormat#is_date_format?

Defined in:
lib/rubyXL/objects/stylesheet.rb

#is_date_format?Boolean

Returns:

  • (Boolean)
[View source]

15
16
17
18
# File 'lib/rubyXL/objects/stylesheet.rb', line 15

def is_date_format?
  #             v-------- Toss all the escaped chars -------v v--- and see if any date-related remained
  !!(format_code.gsub(/("[^"]*"|\[[^\]]*\]|[\\_*].)/i, '') =~ /[dmyhs]/i)
end