diff options
| author | Laurenz Stampfl <47084093+LaurenzV@users.noreply.github.com> | 2023-05-23 10:41:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-23 10:41:20 +0200 |
| commit | 752817ae74607ca23ec0aad51824ddca66faa7a8 (patch) | |
| tree | d9f51f3d029c1ca8754be9ae9ccc9dc91ae6b000 /docs/src/html.rs | |
| parent | f4fd6855e7fb833a2125d2e81aa3b9f548b18170 (diff) | |
Add support for date & time handling (#435)
Diffstat (limited to 'docs/src/html.rs')
| -rw-r--r-- | docs/src/html.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/src/html.rs b/docs/src/html.rs index a3db6393..e0b524ce 100644 --- a/docs/src/html.rs +++ b/docs/src/html.rs @@ -5,6 +5,7 @@ use md::escape::escape_html; use pulldown_cmark as md; use typed_arena::Arena; use typst::diag::FileResult; +use typst::eval::Datetime; use typst::font::{Font, FontBook}; use typst::geom::{Point, Size}; use typst::syntax::{Source, SourceId}; @@ -489,4 +490,8 @@ impl World for DocWorld { .contents() .into()) } + + fn today(&self, _: Option<i64>) -> Option<Datetime> { + Some(Datetime::from_ymd(1970, 1, 1).unwrap()) + } } |
