• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37333 / 1
77%
master: 77%

Build:
DEFAULT BRANCH: master
Ran 11 Nov 2022 11:38AM UTC
Files 386
Run time 21s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Nov 2022 11:38AM UTC coverage: 93.327% (+0.2%) from 93.142%
#37333.1

push

local

web-flow
Dates: Error on construction/parsing with empty strings (#47117)

When attempting to construct a `DateTime`, `Date` or `Time` from an
`AbstractString`, throw an `ArgumentError` if the string is empty.
Likewise, error when `parse`ing an empty string as one of these types,
and return `nothing` from `tryparse`.

This behavior differs from previously.  Before, `Date` and `Time` would
return default values of `Date(1)` and `Time(0)`, respectively, while
`DateTime` would error without a `format` argument.  With a `format`
argument, it would return `DateTime(1)`.  However, this appears not to
have been explicitly intended, but rather a consequence of the way
parsing was implemented; no tests for empty string parsing existed.

This addresses #28090 and #43883; see discussion therein.

Summary of changes:
- Check for empty string in `Base.parse(::DateTime)` and throw if so.
- Change documentation to mention this.
- Add a compat notice to the docs contrasting the old behavior.

80818 of 86597 relevant lines covered (93.33%)

33015200.56 hits per line

Source Files on job #37333.1
  • Tree
  • List 0
  • Changed 185
  • Source Changed 0
  • Coverage Changed 185
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 37333
  • 317211a3 on github
  • Prev Job for on master (##37332.1)
  • Next Job for on master (##37335.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc