Skip to content

Commit 1b1182f

Browse files
committed
Change default behav. to throw error on parse failure
* `AsDate` and `AsDateTime` default behaviour is now to throw an error if the vector of supplied dates cannot be parsed Addresses: DS-1607
1 parent 8de120c commit 1b1182f

6 files changed

Lines changed: 15 additions & 5 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: flipTime
22
Type: Package
33
Title: Tools for Manipulating Time Series
4-
Version: 1.2.2
4+
Version: 2.0.0
55
Author: Displayr <opensource@displayr.com>
66
Maintainer: Displayr <opensource@displayr.com>
77
Description: Functions to aggregate time series into strings, and convert

R/asdate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#' AsDate("1-2-2017", us.format = FALSE)
1717
#' @importFrom lubridate parse_date_time2
1818
#' @export
19-
AsDate <- function(x, us.format = NULL, exact = TRUE, on.parse.failure = "silent")
19+
AsDate <- function(x, us.format = NULL, exact = TRUE, on.parse.failure = "error")
2020
{
2121
var.name <- deparse(substitute(x))
2222
if (inherits(x, c("POSIXct", "POSIXt")))

R/asdatetime.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ParseDateTime <- function(x, us.format = TRUE, time.zone = "UTC")
2727
#' @importFrom lubridate parse_date_time2
2828
#' @export
2929
AsDateTime <- function(x, us.format = NULL, time.zone = "UTC", exact = TRUE,
30-
on.parse.failure = "silent")
30+
on.parse.failure = "error")
3131
{
3232
if (inherits(x, c("Date", "POSIXct", "POSIXt", "POSIXlt")))
3333
return(x)

inst/NEWS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Changes in Version 1.2.2 (2017-11-08)
22
--------------------------------------------------------
33

4+
NEW FEATURES
5+
6+
* `AsDate` and `AsDateTime` now default to throwing an error
7+
if the supplied vector of dates cannot be parsed (DS-1607)
8+
* `PeriodNameToDate` has been deprecated as its functionality
9+
is now included in `AsDate` (DS-1607)
10+
11+
Changes in Version 1.2.2 (2017-11-08)
12+
--------------------------------------------------------
13+
414
BUG FIXES
515

616
* `AsDate` and `AsDateTime` now fail correctly if the supplied vector

man/AsDate.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/AsDateTime.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)