Class: RubyXL::NumberFormat

Inherits:
OOXMLObject show all
Defined in:
lib/rubyXL/objects/stylesheet.rb

Overview

Instance Method Summary collapse

Methods included from OOXMLObjectClassMethods

#define_attribute, #define_child_node, #define_element_name, #obtain_class_variable, #parse, #set_countable

Methods included from OOXMLObjectInstanceMethods

#before_write_xml, #dup, #index_in_collection, #initialize, #write_xml

Instance Method Details

#is_date_format?Boolean

Returns:

  • (Boolean)


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

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