Skip to content

Date format handling improvements

Compare
Choose a tag to compare
@airmoi airmoi released this 01 Aug 18:32
· 84 commits to master since this release

New Features

EXPERIMENTAL : handle date format in find requests

You may now use your own date Format in find Commands.
To activate this feature, set 'useDateFormatInRequests' to true in you FileMaker object

...
$fm->setProperty('useDateFormatInRequests' , true);
$fm->setProperty('dateFormat' , 'Y-m-d');

$command = $fm->newFindCommand('layout_name');
$command->addFindCriterion('dateField' , '2017-08-01');
$command->addFindCriterion('dateField2' , '2017-01-*...2017-08-*');
...

NOTICE : Does not support textual representations such a F, M, D...
Any feedback on this new feature would be appreciated

Magic getter on FileMaker object properties

You may now retrieve defined properties directly from FileMaker object (avoid usage of getProperty and allow code completion in your favorite IDE).

...
echo $fm->hostname;
echo $fm->dateFormat;
....

The above example will output:

localhost
m/d/Y

Edit/Add commands have a new parameter $useRawData

This parameter allow you to by-pass data conversion (date/datetime) while updating or creating a new record

##Bugfix

  • Fixed #12 : curl errors now return an helpful message
  • Fixed #10 : you may now use setField on related records
  • Fixed a bug where $record->commit() produced an exception with datetime values

Other changes (internal)

Some code refactoring and documentation improvements