-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added clock functions and parameters
New configurations: - 'org.addLeftZero' - allow left zero padding on months, dates, hours and minutes (boolean, default false) - 'org.clockInOutSeparator' - set the separator between clock in and clock out blocks (string, default "--") - 'org.clockTotalSeparator' - set the separator between clocks and the clock total (string, default " => ") New commands: - 'org.clockin' - Adds the "CLOCK:" tag (if it doesn't already exists) and a [{year}-{month}-{day} {weekday} {hours}:{minutes}] timestamp - 'org.clockout' - Clears previous clock out block (if exists), adds clockInOutSeparator and a [{year}-{month}-{day} {weekday} {hours}:{minutes}] timestamp - 'org.updateclock' - Clears previous clock total block (if exists), add clockTotalSeparator and the difference between clockin and clockout in the {hours}:{minutes} format. Raises error if there's less than two timestamp blocks Other additions/changes: <simple-datetime.ts> - interface 'ISimpleDateTime' - For the clock functions, extends ISimpleDate with hours and minutes - function 'buildDateString' - Add verification for org.addLeftZero - function 'padVal' - Renamed to padDate - function 'buildDateTimeString' - Like buildDateString, but adds time - function 'padTime' - Like padDate, but for times - function 'dateToSimpleDateTime' - Like dateToSimpleDate, but returns a ISimpleDateTime - function 'currentDatetime' - Renamed to 'currentDate' - function 'currentDateTime' - Like currentDate, but returns an ISimpleDateTime - function 'getClockTotal' - Returns the full string (separator + {hours}:{minutes}) for the clock total
- Loading branch information
Maianne Ribeiro
committed
Oct 3, 2017
1 parent
1421007
commit 49229bd
Showing
5 changed files
with
201 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters