Skip to content

Commit

Permalink
fix(QueryUtils): Use strictDateDetection setting in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
elpete committed Oct 1, 2020
1 parent fc2b2e7 commit 76ae59f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions models/Query/QueryUtils.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ component displayname="QueryUtils" accessors="true" {
*/
property name="strictDateDetection" default="false";

/**
* Creates a new QueryUtils helper.
*
* @strictDateDetection Flag to only parse date objects as timestamps.
* If false, strings that pass `isDate` are also treated as timestamps.
*
* @return qb.models.Query.QueryUtils
*/
public QueryUtils function init( boolean strictDateDetection = false ) {
variables.strictDateDetection = arguments.strictDateDetection;
return this;
}

/**
* Extract a binding from a value.
*
Expand Down

0 comments on commit 76ae59f

Please sign in to comment.