sknowlton
05/16/2022, 2:10 PMwil-shiftinsert
05/16/2022, 2:58 PMsknowlton
05/16/2022, 2:59 PMsknowlton
05/16/2022, 2:59 PMtrue
wil-shiftinsert
05/16/2022, 3:02 PMwil-shiftinsert
05/16/2022, 3:04 PMwil-shiftinsert
05/16/2022, 3:12 PMelse if ( !isNumeric( thisValue ) && isBoolean( thisValue ) && NOT_A_STRING_PROPERTY )
Not sure if that would break code in other places.sknowlton
05/16/2022, 3:21 PMwil-shiftinsert
05/16/2022, 3:33 PMmyVar = true;
In more recent ACF and lucee getMetadata(myVar).getName()
can distinguish between strings and booleans. Depending on your version property definitions might be better. But in that case you ALWAYS have to make sure your booleans are defined as such in your property definitions. (or make this behaviour a switch in the module settings)sknowlton
05/16/2022, 3:47 PMwil-shiftinsert
05/16/2022, 4:00 PMlmajano
05/16/2022, 8:12 PMlmajano
05/16/2022, 8:12 PMlmajano
05/16/2022, 8:13 PMlmajano
05/16/2022, 8:13 PMlmajano
05/16/2022, 8:13 PMlmajano
05/16/2022, 8:14 PMsknowlton
05/16/2022, 8:14 PMtype
lmajano
05/16/2022, 8:14 PMsknowlton
05/16/2022, 8:15 PMlmajano
05/16/2022, 8:16 PMlmajano
05/16/2022, 8:17 PMlmajano
05/16/2022, 8:17 PMsknowlton
05/16/2022, 8:17 PMelse if ( !isNumeric( thisValue ) && isBoolean( thisValue ) ) {
sknowlton
05/16/2022, 8:17 PMsknowlton
05/16/2022, 8:18 PMtrue
or false
)lmajano
05/16/2022, 8:20 PMsknowlton
05/16/2022, 8:21 PMlmajano
05/16/2022, 8:23 PMlmajano
05/16/2022, 8:23 PMlmajano
05/16/2022, 8:23 PMlmajano
05/16/2022, 8:23 PMwil-shiftinsert
05/16/2022, 8:23 PMlmajano
05/16/2022, 8:24 PMlmajano
05/16/2022, 8:24 PMlmajano
05/16/2022, 8:24 PMlmajano
05/16/2022, 8:24 PMsknowlton
05/16/2022, 8:27 PMwil-shiftinsert
05/16/2022, 8:27 PMsknowlton
05/16/2022, 8:28 PMtrue
or false
to these customers'lmajano
05/16/2022, 8:28 PMlmajano
05/16/2022, 8:28 PMsknowlton
05/16/2022, 8:28 PMwil-shiftinsert
05/16/2022, 8:28 PMwil-shiftinsert
05/16/2022, 8:31 PMlmajano
05/16/2022, 8:31 PMtype
attribute for propertieswil-shiftinsert
05/16/2022, 8:32 PMsknowlton
05/16/2022, 8:32 PM""
valueslmajano
05/16/2022, 8:32 PMtype
to determine if it’s a string
or boolean
lmajano
05/16/2022, 8:33 PMlmajano
05/16/2022, 8:33 PMany
lmajano
05/16/2022, 8:33 PMlmajano
05/16/2022, 8:33 PMsknowlton
05/16/2022, 8:33 PMproperty name="answer" type="string" sqltype='varchar';
there's our property defwil-shiftinsert
05/16/2022, 8:33 PMlmajano
05/16/2022, 8:33 PMsknowlton
05/16/2022, 8:33 PMany
lmajano
05/16/2022, 8:33 PMlmajano
05/16/2022, 8:34 PMlmajano
05/16/2022, 8:34 PMlmajano
05/16/2022, 8:34 PMtype
lmajano
05/16/2022, 8:34 PMincludes
listlmajano
05/16/2022, 8:35 PMlmajano
05/16/2022, 8:35 PMsknowlton
05/16/2022, 8:35 PMsknowlton
05/16/2022, 8:35 PMlmajano
05/16/2022, 8:36 PMlmajano
05/16/2022, 8:37 PMwil-shiftinsert
05/16/2022, 8:38 PMwil-shiftinsert
05/16/2022, 8:39 PMlmajano
05/16/2022, 8:39 PMlmajano
05/16/2022, 8:39 PMisDate()
was 10000 times slowerlmajano
05/16/2022, 8:39 PM// Match timestamps + date/time objects
else if (
isSimpleValue( thisValue )
&&
(
reFind( "^\{ts ([^\}])*\}", thisValue ) // Lucee date format
||
reFind( "^\d{4}-\d{2}-\d{2}", thisValue ) // ACF date format begins with YYYY-MM-DD
)
) {
lmajano
05/16/2022, 8:39 PMlmajano
05/16/2022, 8:40 PMwil-shiftinsert
05/16/2022, 8:40 PMlmajano
05/16/2022, 8:40 PMisDate()
is broken in my opinionlmajano
05/16/2022, 8:41 PMlmajano
05/16/2022, 8:41 PMlmajano
05/16/2022, 8:41 PMwil-shiftinsert
05/16/2022, 8:43 PMlmajano
05/16/2022, 8:43 PMisDate()
wil-shiftinsert
05/16/2022, 8:44 PMlmajano
05/16/2022, 8:44 PMlmajano
05/16/2022, 8:45 PMlmajano
05/16/2022, 8:45 PMjava.time
packagewil-shiftinsert
05/16/2022, 8:46 PMlmajano
05/16/2022, 8:47 PMlmajano
05/16/2022, 8:47 PMwil-shiftinsert
05/16/2022, 8:47 PMlmajano
05/16/2022, 8:48 PMlmajano
05/16/2022, 8:48 PMlmajano
05/16/2022, 8:48 PMlmajano
05/16/2022, 8:48 PMlmajano
05/16/2022, 8:48 PMlmajano
05/16/2022, 8:48 PMThread safety – The Date and Calendar classes are not thread safe, leaving developers to deal with the headache of hard-to-debug concurrency issues and to write additional code to handle thread safety. On the contrary, the new Date and Time APIs introduced in Java 8 are immutable and thread safe, thus taking that concurrency headache away from developers.
lmajano
05/16/2022, 8:48 PMlmajano
05/16/2022, 8:49 PMlmajano
05/16/2022, 8:49 PMlmajano
05/16/2022, 8:49 PMlmajano
05/16/2022, 8:49 PMincludes
more specificlmajano
05/16/2022, 8:50 PMlmajano
05/16/2022, 8:50 PMlmajano
05/16/2022, 8:50 PManswer
lmajano
05/16/2022, 8:51 PM{ property : "answer", castTo : "boolean" }
lmajano
05/16/2022, 8:51 PMwil-shiftinsert
05/16/2022, 9:11 PMsknowlton
05/16/2022, 11:06 PM