Skip to content

Commit

Permalink
add NEWS entry and bump development version
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Dec 15, 2021
1 parent b93d786 commit 5b5340f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: openxlsx
Title: Read, Write and Edit xlsx Files
Version: 4.2.5
Version: 4.2.5.1
Date: 2021-12-13
Authors@R:
c(person(given = "Philipp",
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# openxlsx (development version)

## Improvements

* Improve detectDates ([#288](https://github.com/ycphs/openxlsx/issues/288))

# openxlsx 4.2.5

## Fixes
Expand Down
4 changes: 2 additions & 2 deletions src/write_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ SEXP buildMatrixMixed(CharacterVector v,
for(int i = 0;i < k; i++)
m(rowInd[i], colInd[i]) = v[i];


// convert numerics to dates
Rcpp::Function cTD("convertToDate");

// this will be the return data.frame
List dfList(nCols);
Expand Down Expand Up @@ -231,7 +232,6 @@ SEXP buildMatrixMixed(CharacterVector v,
try{
// Some values are incorrectly detected as dates. This regex determines if they are numerics.
// If so, they are converted to Dates.
Rcpp::Function cTD("convertToDate");
if (std::regex_match( dt_str, std::regex( ( "((\\+|-)?[[:digit:]]+)(\\.(([[:digit:]]+)?))?" ) ) )) {
datetmp[ri] = as<Rcpp::Date>(cTD(dt_str));
} else {
Expand Down

0 comments on commit 5b5340f

Please sign in to comment.