Releases: oxeanbits/parsecs-android
Releases · oxeanbits/parsecs-android
Release list
Fix default_value function when dealing with null token
This release comes with a fix regarding the null token used for kotlin applications.
default_value(null, "something") -> somethingAdd default_value() function
- Adds new function on the library.:
default_value(value, standard)If the value is NULL, the result of this function is the standard, otherwise, the result is the value.
This function accept both integer, float, string and boolean types. (C++ overloading for the win)
Some success test samples: ✅
default_value(10, 1)
default_value(NULL, 1)
default_value(10.4, 1.01)
default_value(NULL, 1.01)
default_value("filled", "default")
default_value(NULL, "default")
default_value(false, true)
default_value(NULL, true)Some failure test samples: 🚫
default_value(1, 4.5)
default_value(4.5, "string")
default_value("string", true)
default_value(true, 1)Add add_days() and mask() functions
The new functions
mask(string, number)
mask(string, number)
# Result: The mask applied to a number
mask("000", 1) => "001"
mask("000", 1234) => "1234"
mask("000-000-000", 123456789) => "123-456-789"
mask("00/00/0000", 21011993) => "21/01/1993"
# Observation: You should not use a number that has more than 17 digits as a second parameter due to imprecision issuesadd_days(date, number)
add_days(date, number)
# Result: The addition (in days) between a date and a days quantity.
add_days("2019-01-01", 3) => "2019-01-04"
add_days("2019-01-01T08:30", -1) => "2018-12-31T08:30"
add_days("2019-01-01T08:30", 0.5) => "2019-01-01T20:30"Update current date
Add diff hours
Update native code
Update native code to add new methods.
Update gradle version
- Update gradle version to 4.6
- Remove unused packages
- Remove .idea folder
Fix error messages
- Add error message to date calculations.
- Catch runtime errors
Calculate formulas
- Add possibility to calculate formulas
Initial version
Added parsec c++ code
Added jni methods