is_time_in_given_format

sunpy.time.is_time_in_given_format(time_string, time_format)[source] [edit on github]

Tests whether a time string is formatted according to the given time format.

Parameters
  • time_string (str) – Date to parse.

  • time_format (basestring, utime, datetime, optional) – Specifies the format user has provided the time_string in.

Returns

boolTrue if can it if follows the time_format.