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.

add condition: year < 2000

See original GitHub issue

As per @georgd here:

At somoe places, years should be formtatted with two digits if year < 2000 and with four digits otherwise. Am I right in assuming that that’s not possible? At least I haven’t found it in the documentation. It’s a requirement that I met in various (legal and non-legal) styles already, especially when dealing with EU sources.

I think that sound like a reasonable suggestion. Other opinions about this? Anyone else has seen that requirement before? If we add this: Perhaps it should be done in a not so specific way. Rather than if after-2000 perhaps something like "if date-range="1900-1999" which would be adaptable to other requirements.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:35 (35 by maintainers)

github_iconTop GitHub Comments

2reactions
bdarcuscommented, Jun 16, 2020

We need a solution that works in the context of xml processing tools. One question I was looking to find an answer for recently, but did not, was whether attribute value order is preserved in XML. Attribute order itself is NOT.

Anyway, more options:

date-range-key='issued' date-range-values='1900-2000'

… or, I think the best balance of flexibility, conciseness, and processing and validation rigor:

date-range-key='issued' date-range-start='1900' date-range-end='2000'
date-range-key='issued' date-range-end='1900'
1reaction
bdarcuscommented, Jun 29, 2020

The cool thing about rnc is it’s so easy (unlike json schema) to test out the validation logic.

start = element style { cs-test+ }

cs-test = element test { test-dates | test-names }

test-dates =
  attribute tested { "issued" },
  attribute date-test { text }

test-names =
  attribute tested { "author" },
  attribute name-test { text }
<?xml version="1.0"?>
<style>
  <test tested="issued" date-test="foo"/>
  <test tested="author" name-test="bar"/>
</style>
Read more comments on GitHub >

github_iconTop Results From Across the Web

ADHD Throughout the Years - CDC
ADHD diagnosis throughout the years: Estimates from published nationally representative survey data ; 2000 ; 2001 ; 2002 ; 2003, 7.8 ...
Read more >
The Science of Leap Year | National Air and Space Museum
The rule is that if the year is divisible by 100 and not divisible by 400, leap year is skipped. The year 2000...
Read more >
The History of ADHD: A Timeline - Healthline
Here's a timeline of the condition's history. ... the name of the disorder from hyperkinetic reaction of childhood to attention deficit disorder (ADD)....
Read more >
Statutes, Regulations, and Guidelines - SAMHSA
Drug Addiction Treatment Act of 2000 (DATA 2000) Learn more about buprenorphine to treat substance use disorders. Find information on ...
Read more >
Method to determine whether a year is a leap year - Office
Describes how to determine whether the year in a date that is used in an Excel ... The following years are leap years:...
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