question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alternative way to specify time unit

See original GitHub issue

Vega supports arrays for interval time units. For example ["year", "month", "date"]. In Vega-Lite, we support strings yearmonthdate since they are easier to type and validate. However, it may make sense to support the array syntax. One limitation of our string approach is that we don’t support all combinations of time units (e.g. yearseconds). We don’t want to just support string since we would lose the ability to validate. However, adding the array syntax would introduce another way to specify interval time units.

@kanitw, @arvind and @haldenl probably have opinions here.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
kanitwcommented, Jan 3, 2021

Array sounds good to me too.

1reaction
domoritzcommented, Sep 14, 2020

Oh, I hadn’t thought of typing the whole tuple. I haven’t checked whether that approach works with autocomplete in VSCode for TS and the editor with JSON schema.

Btw, I would be in favor of the array syntax and would be happy to review a pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unit of time - Wikipedia
A unit of time is any particular time interval, used as a standard way of measuring or expressing duration. The base unit of...
Read more >
TimeUnit (Java Platform SE 7 ) - Oracle Help Center
A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing...
Read more >
TimeUnit Class in Java with Examples - GeeksforGeeks
TimeUnit is useful to know how a given time should be interpreted that is which time unit should be considered. Minute differences between...
Read more >
More concise way to specify time unit #1487 - GitHub
2.3) For chronological / multi-part time unit, in Vega-Lite we use concatenation of singular time units. However, Datalib uses singular form of ...
Read more >
How to define time unit and time precision - Stack Overflow
The time unit and precision can be declared by the timeunit and timeprecision keywords, respectively, and set to a time literal (see 5.8)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found