Skip to content

Commit

Permalink
feat(style/date): circa and uncertain
Browse files Browse the repository at this point in the history
Signed-off-by: Bruce D'Arcus <bdarcus@gmail.com>
  • Loading branch information
bdarcus committed Jun 13, 2023
1 parent af5b71c commit 233b00f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions style/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,20 @@ pub enum ShortTitleOptions {

/* Date-time formatting configuration. */

#[derive(Debug, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
#[derive(Debug, Default, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
pub struct StyleTemplateDate {
pub date: Option<DateStyle>,
pub time: Option<TimeStyle>,
pub month: Option<MonthStyle>,
pub year: Option<YearStyle>,
/// The format to use for a complete date.
pub date: DateStyle,
/// The format to use for a time..
pub time: TimeStyle,
/// The format to use for a month.
pub month: MonthStyle,
/// The format to use for a year.
pub year: YearStyle,
/// Wtih an approximate date, whether to add the circa prefix.
pub circa: bool,
/// With an uncertain date, whether to add the question mark suffix.
pub uncertain: bool,
}

#[derive(Debug, Default, Deserialize, Serialize, Clone, JsonSchema, PartialEq)]
Expand Down

0 comments on commit 233b00f

Please sign in to comment.