We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b36d7ef commit c3d04faCopy full SHA for c3d04fa
gix-date/src/time/mod.rs
@@ -33,6 +33,13 @@ pub enum Format {
33
#[derive(Clone, Copy, Debug)]
34
pub struct CustomFormat(pub(crate) &'static str);
35
36
+impl CustomFormat {
37
+ /// Create a new custom format.
38
+ pub const fn new(format: &'static str) -> Self {
39
+ Self(format)
40
+ }
41
+}
42
+
43
impl From<CustomFormat> for Format {
44
fn from(custom_format: CustomFormat) -> Format {
45
Format::Custom(custom_format)
0 commit comments