Method: OpenHAB::CoreExt::Java::MonthDay.parse

Defined in:
lib/openhab/core_ext/java/month_day.rb

.parse(string) ⇒ MonthDay

Parses strings in the form “M-d”

Parameters:

  • string (String)

Returns:



22
23
24
25
26
27
28
# File 'lib/openhab/core_ext/java/month_day.rb', line 22

def parse(string)
  logger.trace("#{self.class}.parse #{string} (#{string.class})")
  java_send(:parse,
            [java.lang.CharSequence, java.time.format.DateTimeFormatter],
            string.to_s,
            java.time.format.DateTimeFormatter.ofPattern("[--]M-d"))
end