Use str.ends_with for patterns ending in Z

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
This commit is contained in:
jfinkels
2025-02-16 11:16:23 -05:00
committed by GitHub
parent 8aee979de5
commit d4353d0888
+1 -1
View File
@@ -89,7 +89,7 @@ mod format {
/// Whether the pattern ends in the character `Z`.
pub(crate) fn is_zulu(pattern: &str) -> bool {
pattern == YYYYMMDDHHMMSS_HYPHENATED_ZULU || pattern == YYYYMMDDHHMMSS_T_SEP_HYPHENATED_ZULU
pattern.ends_with('Z')
}
/// Patterns for datetimes with timezones.