diff --git a/README.md b/README.md
index 7226f0d..9c3fa04 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# BokkyPooBah's DateTime Library
-**Status: Work in progress**
+**Status: I'm currently trying to get this library audited, so don't use in production mode yet. Feedback welcome.**
A gas-efficient Solidity date and time library.
@@ -46,9 +46,12 @@ Instead of using loops and lookup tables, this date conversions library uses for
* [subHours](#subhours)
* [subMinutes](#subminutes)
* [subSeconds](#subseconds)
- * [diffDays](#diffdays)
- * [diffMonths](#diffmonths)
* [diffYears](#diffyears)
+ * [diffMonths](#diffmonths)
+ * [diffDays](#diffdays)
+ * [diffHours](#diffhours)
+ * [diffMinutes](#diffminutes)
+ * [diffSeconds](#diffseconds)
* [Gas Cost](#gas-cost)
* [Algorithm](#algorithm)
* [Testing](#testing)
@@ -60,8 +63,8 @@ Instead of using loops and lookup tables, this date conversions library uses for
## History
Version | Date | Notes
-:------- |:------------ |:-----------------------------
-v1.00 | May 25 2018 | First release (currently WIP)
+:------- |:------------ |:---------------------------------------
+v1.00 | May 25 2018 | First release (currently being audited)
@@ -95,7 +98,7 @@ All functions operate on the `uint` timestamp data type, except for functions pr
### _daysFromDate
-Calculate the number of days `_days` from 1970/01/01 to `year`/`month`/`day`
+Calculate the number of days `_days` from 1970/01/01 to `year`/`month`/`day`.
```javascript
function _daysFromDate(uint year, uint month, uint day) public pure returns (uint _days)
@@ -105,7 +108,7 @@ function _daysFromDate(uint year, uint month, uint day) public pure returns (uin
### _daysToDate
-Calculate `year`/`month`/`day` from the number of days `_days` since 1970/01/01
+Calculate `year`/`month`/`day` from the number of days `_days` since 1970/01/01 .
```javascript
function _daysToDate(uint _days) public pure returns (uint year, uint month, uint day)
@@ -115,7 +118,7 @@ function _daysToDate(uint _days) public pure returns (uint year, uint month, uin
### timestampFromDate
-Calculate the `timestamp` to `year`/`month`/`day`
+Calculate the `timestamp` to `year`/`month`/`day`.
```javascript
function timestampFromDate(uint year, uint month, uint day) public pure returns (uint timestamp)
@@ -125,7 +128,7 @@ function timestampFromDate(uint year, uint month, uint day) public pure returns
### timestampFromDateTime
-Calculate the `timestamp` to `year`/`month`/`day` `hour`:`minute`:`second` UTC
+Calculate the `timestamp` to `year`/`month`/`day` `hour`:`minute`:`second` UTC.
```javascript
function timestampFromDateTime(uint year, uint month, uint day, uint hour, uint minute, uint second) public pure returns (uint timestamp)
@@ -135,7 +138,7 @@ function timestampFromDateTime(uint year, uint month, uint day, uint hour, uint
### timestampToDate
-Calculate `year`/`month`/`day` from `timestamp`
+Calculate `year`/`month`/`day` from `timestamp`.
```javascript
function timestampToDate(uint timestamp) public pure returns (uint year, uint month, uint day)
@@ -145,7 +148,7 @@ function timestampToDate(uint timestamp) public pure returns (uint year, uint mo
### timestampToDateTime
-Calculate `year`/`month`/`day` `hour`:`minute`:`second` from `timestamp`
+Calculate `year`/`month`/`day` `hour`:`minute`:`second` from `timestamp`.
```javascript
function timestampToDateTime(uint timestamp) public pure returns (uint year, uint month, uint day, uint hour, uint minute, uint second)
@@ -195,7 +198,7 @@ function isWeekEnd(uint timestamp) public pure returns (bool weekEnd)
### getDaysInMonth
-Return the day in the month `daysInMonth` for the month specified by `timestamp`
+Return the day in the month `daysInMonth` for the month specified by `timestamp`.
```javascript
function getDaysInMonth(uint timestamp) public pure returns (uint daysInMonth)
@@ -205,7 +208,7 @@ function getDaysInMonth(uint timestamp) public pure returns (uint daysInMonth)
### _getDaysInMonth
-Return the day in the month `daysInMonth` (1, ..., 31) for the month specified by the `year`/`month`
+Return the day in the month `daysInMonth` (1, ..., 31) for the month specified by the `year`/`month`.
```javascript
function _getDaysInMonth(uint year, uint month) public pure returns (uint daysInMonth)
@@ -215,7 +218,7 @@ function _getDaysInMonth(uint year, uint month) public pure returns (uint daysIn
### getDayOfWeek
-Return the day of the week `dayOfWeek` (1 = Monday, ..., 7 = Sunday) for the date specified by `timestamp`
+Return the day of the week `dayOfWeek` (1 = Monday, ..., 7 = Sunday) for the date specified by `timestamp`.
```javascript
function getDayOfWeek(uint timestamp) public pure returns (uint dayOfWeek)
@@ -225,7 +228,7 @@ function getDayOfWeek(uint timestamp) public pure returns (uint dayOfWeek)
### getYear
-Get the `year` of the date specified by `timestamp`
+Get the `year` of the date specified by `timestamp`.
```javascript
function getYear(uint timestamp) public pure returns (uint year)
@@ -235,7 +238,7 @@ function getYear(uint timestamp) public pure returns (uint year)
### getMonth
-Get the `month` of the date specified by `timestamp`
+Get the `month` of the date specified by `timestamp`.
```javascript
function getMonth(uint timestamp) public pure returns (uint month)
@@ -245,7 +248,7 @@ function getMonth(uint timestamp) public pure returns (uint month)
### getDay
-Get the day of the month `day` (1, ..., 31) of the date specified `timestamp`
+Get the day of the month `day` (1, ..., 31) of the date specified `timestamp`.
```javascript
function getDay(uint timestamp) public pure returns (uint day)
@@ -255,7 +258,7 @@ function getDay(uint timestamp) public pure returns (uint day)
### getHour
-Get the `hour` of the date and time specified by `timestamp`
+Get the `hour` of the date and time specified by `timestamp`.
```javascript
function getHour(uint timestamp) public pure returns (uint hour)
@@ -265,7 +268,7 @@ function getHour(uint timestamp) public pure returns (uint hour)
### getMinute
-Get the `minute` of the date and time specified by `timestamp`
+Get the `minute` of the date and time specified by `timestamp`.
```javascript
function getMinute(uint timestamp) public pure returns (uint minute)
@@ -275,7 +278,7 @@ function getMinute(uint timestamp) public pure returns (uint minute)
### getSecond
-Get the `second` of the date and time specified by `timestamp`
+Get the `second` of the date and time specified by `timestamp`.
```javascript
function getSecond(uint timestamp) public pure returns (uint second)
@@ -285,6 +288,10 @@ function getSecond(uint timestamp) public pure returns (uint second)
### addYears
+Add `_years` years to the date and time specified by `timestamp`.
+
+Note that the resulting day of the month will be adjusted if it exceeds the valid number of days in the month. For example, if the original date is 2020/02/29 and an additional year is added to this date, the resulting date will be an invalid date of 2021/02/29. The resulting date is then adjusted to 2021/02/28.
+
```javascript
function addYears(uint timestamp, uint _years) public pure returns (uint newTimestamp)
```
@@ -293,6 +300,10 @@ function addYears(uint timestamp, uint _years) public pure returns (uint newTime
### addMonths
+Add `_months` months to the date and time specified by `timestamp`.
+
+Note that the resulting day of the month will be adjusted if it exceeds the valid number of days in the month. For example, if the original date is 2019/01/31 and an additional month is added to this date, the resulting date will be an invalid date of 2019/02/31. The resulting date is then adjusted to 2019/02/28.
+
```javascript
function addMonths(uint timestamp, uint _months) public pure returns (uint newTimestamp)
```
@@ -301,6 +312,8 @@ function addMonths(uint timestamp, uint _months) public pure returns (uint newTi
### addDays
+Add `_days` days to the date and time specified by `timestamp`.
+
```javascript
function addDays(uint timestamp, uint _days) public pure returns (uint newTimestamp)
```
@@ -309,6 +322,8 @@ function addDays(uint timestamp, uint _days) public pure returns (uint newTimest
### addHours
+Add `_hours` hours to the date and time specified by `timestamp`.
+
```javascript
function addHours(uint timestamp, uint _hours) public pure returns (uint newTimestamp)
```
@@ -317,6 +332,8 @@ function addHours(uint timestamp, uint _hours) public pure returns (uint newTime
### addMinutes
+Add `_minutes` minutes to the date and time specified by `timestamp`.
+
```javascript
function addMinutes(uint timestamp, uint _minutes) public pure returns (uint newTimestamp)
```
@@ -325,6 +342,8 @@ function addMinutes(uint timestamp, uint _minutes) public pure returns (uint new
### addSeconds
+Add `_seconds` seconds to the date and time specified by `timestamp`.
+
```javascript
function addSeconds(uint timestamp, uint _seconds) public pure returns (uint newTimestamp)
```
@@ -333,6 +352,10 @@ function addSeconds(uint timestamp, uint _seconds) public pure returns (uint new
### subYears
+Subtract `_years` years from the date and time specified by `timestamp`.
+
+Note that the resulting day of the month will be adjusted if it exceeds the valid number of days in the month. For example, if the original date is 2020/02/29 and a year is subtracted from this date, the resulting date will be an invalid date of 2019/02/29. The resulting date is then adjusted to 2019/02/28.
+
```javascript
function subYears(uint timestamp, uint _years) public pure returns (uint newTimestamp)
```
@@ -341,6 +364,10 @@ function subYears(uint timestamp, uint _years) public pure returns (uint newTime
### subMonths
+Subtract `_months` months from the date and time specified by `timestamp`.
+
+Note that the resulting day of the month will be adjusted if it exceeds the valid number of days in the month. For example, if the original date is 2019/03/31 and a month is subtracted from this date, the resulting date will be an invalid date of 2019/02/31. The resulting date is then adjusted to 2019/02/28.
+
```javascript
function subMonths(uint timestamp, uint _months) public pure returns (uint newTimestamp)
```
@@ -349,6 +376,8 @@ function subMonths(uint timestamp, uint _months) public pure returns (uint newTi
### subDays
+Subtract `_days` days from the date and time specified by `timestamp`.
+
```javascript
function subDays(uint timestamp, uint _days) public pure returns (uint newTimestamp)
```
@@ -357,6 +386,8 @@ function subDays(uint timestamp, uint _days) public pure returns (uint newTimest
### subHours
+Subtract `_hours` hours from the date and time specified by `timestamp`.
+
```javascript
function subHours(uint timestamp, uint _hours) public pure returns (uint newTimestamp)
```
@@ -365,6 +396,8 @@ function subHours(uint timestamp, uint _hours) public pure returns (uint newTime
### subMinutes
+Subtract `_minutes` minutes from the date and time specified by `timestamp`.
+
```javascript
function subMinutes(uint timestamp, uint _minutes) public pure returns (uint newTimestamp)
```
@@ -373,32 +406,82 @@ function subMinutes(uint timestamp, uint _minutes) public pure returns (uint new
### subSeconds
+Subtract `_seconds` seconds from the date and time specified by `timestamp`.
+
```javascript
function subSeconds(uint timestamp, uint _seconds) public pure returns (uint newTimestamp)
```
-### diffDays
+### diffYears
+
+Calculate the number of years between the dates specified by `fromTimeStamp` and `toTimestamp`.
+
+Note that this calculation is computed as `getYear(toTimestamp) - getYear(fromTimestamp)`, rather that subtracting the years (since 1970/01/01) represented by both `{to|from}Timestamp`.
```javascript
-function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days)
+function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years)
```
### diffMonths
+Calculate the number of months between the dates specified by `fromTimeStamp` and `toTimestamp`.
+
+Note that this calculation is computed as `getYear(toTimestamp) * 12 + getMonth(toTimestamp) - getYear(fromTimestamp) * 12 - getMonth(fromTimestamp)`, rather that subtracting the months (since 1970/01/01) represented by both `{to|from}Timestamp`.
+
```javascript
function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months)
```
-### diffYears
+### diffDays
+
+Calculate the number of days between the dates specified by `fromTimeStamp` and `toTimestamp`.
+
+Note that this calculation is computed as `(toTimestamp - fromTimestamp) / SECONDS_PER_DAY`, rather that subtracting the days (since 1970/01/01) represented by both `{to|from}Timestamp`.
```javascript
-function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years)
+function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days)
+```
+
+
+
+### diffHours
+
+Calculate the number of hours between the dates specified by `fromTimeStamp` and `toTimestamp`.
+
+Note that this calculation is computed as `(toTimestamp - fromTimestamp) / SECONDS_PER_HOUR`, rather that subtracting the hours (since 1970/01/01) represented by both `{to|from}Timestamp`.
+
+```javascript
+function diffHours(uint fromTimestamp, uint toTimestamp) public pure returns (uint _hours)
+```
+
+
+
+### diffMinutes
+
+Calculate the number of minutes between the dates specified by `fromTimeStamp` and `toTimestamp`.
+
+Note that this calculation is computed as `(toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE`, rather that subtracting the minutes (since 1970/01/01) represented by both `{to|from}Timestamp`.
+
+```javascript
+function diffMinutes(uint fromTimestamp, uint toTimestamp) public pure returns (uint _minutes)
+```
+
+
+
+### diffSeconds
+
+Calculate the number of seconds between the dates specified by `fromTimeStamp` and `toTimestamp`.
+
+Note that this calculation is computed as `toTimestamp - fromTimestamp`.
+
+```javascript
+function diffSeconds(uint fromTimestamp, uint toTimestamp) public pure returns (uint _seconds)
```
@@ -418,7 +501,7 @@ From executing the following function, the transaction gas cost is 24,693
24693
```
-From Remix, the execution gas cost is 3,101.
+From Remix, the execution gas cost is 3,101 .
@@ -433,7 +516,7 @@ From executing the following function, the transaction gas cost is 25,054
25054
```
-From Remix, the execution gas cost is 2,566
+From Remix, the execution gas cost is 2,566 .
@@ -554,7 +637,7 @@ in [test/test1results.txt](test/test1results.txt) and the detailed output saved
* [x] Test `get{Year|Month|Day|Hour|Minute|Second}(...)`
* [x] Test `add{Years|Months|Days|Hours|Minutes|Seconds}(...)`
* [x] Test `sub{Years|Months|Days|Hours|Minutes|Seconds}(...)`
-* [x] Test `diff{Days|Months|Years}(...)`
+* [x] Test `diff{Years|Months|Days|Hours|Minutes|Seconds}(...)`
* [x] For a range of Unix timestamps from 1970/01/01 to 2345/12/21
* [x] Generate the year/month/day hour/minute/second from the Unix timestamp using `timestampToDateTime(...)`
* [x] Generate the Unix timestamp from the calculated year/month/day hour/minute/second using `timestampFromDateTime(...)`
@@ -564,4 +647,4 @@ in [test/test1results.txt](test/test1results.txt) and the detailed output saved
-(c) BokkyPooBah / Bok Consulting Pty Ltd - May 23 2018. [GNU Lesser General Public License 3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html)
\ No newline at end of file
+(c) BokkyPooBah / Bok Consulting Pty Ltd - May 26 2018. [GNU Lesser General Public License 3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html)
\ No newline at end of file
diff --git a/contracts/BokkyPooBahsDateTimeLibrary.sol b/contracts/BokkyPooBahsDateTimeLibrary.sol
index 0d3719f..55a29cf 100644
--- a/contracts/BokkyPooBahsDateTimeLibrary.sol
+++ b/contracts/BokkyPooBahsDateTimeLibrary.sol
@@ -30,9 +30,9 @@ pragma solidity ^0.4.23;
library BokkyPooBahsDateTimeLibrary {
- uint constant SECONDS_PER_MINUTE = 60;
- uint constant SECONDS_PER_HOUR = 60 * 60;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
+ uint constant SECONDS_PER_HOUR = 60 * 60;
+ uint constant SECONDS_PER_MINUTE = 60;
int constant OFFSET19700101 = 2440588;
uint constant DOW_MON = 1;
@@ -280,11 +280,7 @@ library BokkyPooBahsDateTimeLibrary {
require(newTimestamp <= timestamp);
}
- function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
- require(fromTimestamp <= toTimestamp);
- _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;
- }
- function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months) {
+ function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
require(fromTimestamp <= toTimestamp);
uint fromYear;
uint fromMonth;
@@ -294,9 +290,9 @@ library BokkyPooBahsDateTimeLibrary {
uint toDay;
(fromYear, fromMonth, fromDay) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
(toYear, toMonth, toDay) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
- _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;
+ _years = toYear - fromYear;
}
- function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
+ function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months) {
require(fromTimestamp <= toTimestamp);
uint fromYear;
uint fromMonth;
@@ -306,6 +302,22 @@ library BokkyPooBahsDateTimeLibrary {
uint toDay;
(fromYear, fromMonth, fromDay) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
(toYear, toMonth, toDay) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
- _years = toYear - fromYear;
+ _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;
+ }
+ function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
+ require(fromTimestamp <= toTimestamp);
+ _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;
+ }
+ function diffHours(uint fromTimestamp, uint toTimestamp) public pure returns (uint _hours) {
+ require(fromTimestamp <= toTimestamp);
+ _hours = (toTimestamp - fromTimestamp) / SECONDS_PER_HOUR;
+ }
+ function diffMinutes(uint fromTimestamp, uint toTimestamp) public pure returns (uint _minutes) {
+ require(fromTimestamp <= toTimestamp);
+ _minutes = (toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE;
+ }
+ function diffSeconds(uint fromTimestamp, uint toTimestamp) public pure returns (uint _seconds) {
+ require(fromTimestamp <= toTimestamp);
+ _seconds = toTimestamp - fromTimestamp;
}
}
\ No newline at end of file
diff --git a/contracts/TestDateTime.sol b/contracts/TestDateTime.sol
index feb5b81..765bdaa 100644
--- a/contracts/TestDateTime.sol
+++ b/contracts/TestDateTime.sol
@@ -116,13 +116,22 @@ contract TestDateTime {
newTimestamp = BokkyPooBahsDateTimeLibrary.subSeconds(timestamp, _seconds);
}
- function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
- _days = BokkyPooBahsDateTimeLibrary.diffDays(fromTimestamp, toTimestamp);
+ function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
+ _years = BokkyPooBahsDateTimeLibrary.diffYears(fromTimestamp, toTimestamp);
}
function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months) {
_months = BokkyPooBahsDateTimeLibrary.diffMonths(fromTimestamp, toTimestamp);
}
- function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
- _years = BokkyPooBahsDateTimeLibrary.diffYears(fromTimestamp, toTimestamp);
+ function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
+ _days = BokkyPooBahsDateTimeLibrary.diffDays(fromTimestamp, toTimestamp);
+ }
+ function diffHours(uint fromTimestamp, uint toTimestamp) public pure returns (uint _hours) {
+ _hours = BokkyPooBahsDateTimeLibrary.diffHours(fromTimestamp, toTimestamp);
+ }
+ function diffMinutes(uint fromTimestamp, uint toTimestamp) public pure returns (uint _minutes) {
+ _minutes = BokkyPooBahsDateTimeLibrary.diffMinutes(fromTimestamp, toTimestamp);
+ }
+ function diffSeconds(uint fromTimestamp, uint toTimestamp) public pure returns (uint _seconds) {
+ _seconds = BokkyPooBahsDateTimeLibrary.diffSeconds(fromTimestamp, toTimestamp);
}
}
\ No newline at end of file
diff --git a/test/01_test1.sh b/test/01_test1.sh
index bf25d53..d05e501 100755
--- a/test/01_test1.sh
+++ b/test/01_test1.sh
@@ -478,17 +478,28 @@ if ("$MODE" == "full") {
}
if ("$MODE" == "full") {
- console.log("RESULT: ---------- Test diff{Days|Months|Years} ----------");
+ console.log("RESULT: ---------- Test diff{Years|Months|Days|Hours|Minutes|Seconds} ----------");
fromTimestamp = testDateTime.timestampFromDateTime(2017, 10, 21, 1, 2, 3);
+ console.log("RESULT: fromTimestamp=" + fromTimestamp + " " + testDateTime.timestampToDateTime(fromTimestamp));
toTimestamp = testDateTime.timestampFromDateTime(2019, 7, 18, 4, 5, 6);
+ console.log("RESULT: toTimestamp=" + toTimestamp + " " + testDateTime.timestampToDateTime(toTimestamp));
- if (!assert(testDateTime.diffDays(fromTimestamp, toTimestamp) == 635, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(fromTimestamp) + " has 635 days diff")) {
+ if (!assert(testDateTime.diffYears(fromTimestamp, toTimestamp) == 2, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(toTimestamp) + " has 2 years diff")) {
failureDetected = true;
}
- if (!assert(testDateTime.diffMonths(fromTimestamp, toTimestamp) == 21, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(fromTimestamp) + " has 21 months diff")) {
+ if (!assert(testDateTime.diffMonths(fromTimestamp, toTimestamp) == 21, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(toTimestamp) + " has 21 months diff")) {
failureDetected = true;
}
- if (!assert(testDateTime.diffYears(fromTimestamp, toTimestamp) == 2, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(fromTimestamp) + " has 2 years diff")) {
+ if (!assert(testDateTime.diffDays(fromTimestamp, toTimestamp) == 635, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(toTimestamp) + " has 635 days diff")) {
+ failureDetected = true;
+ }
+ if (!assert(testDateTime.diffHours(fromTimestamp, toTimestamp) == 15243, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(toTimestamp) + " has 15,243 hours diff")) {
+ failureDetected = true;
+ }
+ if (!assert(testDateTime.diffMinutes(fromTimestamp, toTimestamp) == 914583, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(toTimestamp) + " has 914,583 minutes diff")) {
+ failureDetected = true;
+ }
+ if (!assert(testDateTime.diffSeconds(fromTimestamp, toTimestamp) == 54874983, testDateTime.timestampToDateTime(fromTimestamp) + " to " + testDateTime.timestampToDateTime(toTimestamp) + " has 54,874,983 seconds diff")) {
failureDetected = true;
}
console.log("RESULT: ");
diff --git a/test/BokkyPooBahsDateTimeLibrary.js b/test/BokkyPooBahsDateTimeLibrary.js
index 55e71ae..4320cf2 100644
--- a/test/BokkyPooBahsDateTimeLibrary.js
+++ b/test/BokkyPooBahsDateTimeLibrary.js
@@ -3,8 +3,8 @@ var dateTimeLibOutput={
{
"BokkyPooBahsDateTimeLibrary.sol:BokkyPooBahsDateTimeLibrary" :
{
- "abi" : "[{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"subHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"_daysFromDate\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"timestampFromDate\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDayOfWeek\",\"outputs\":[{\"name\":\"dayOfWeek\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getHour\",\"outputs\":[{\"name\":\"hour\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"}],\"name\":\"_getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"addMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekEnd\",\"outputs\":[{\"name\":\"weekEnd\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"addYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"subYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"addHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"name\":\"timestampFromDateTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDay\",\"outputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"addDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMonths\",\"outputs\":[{\"name\":\"_months\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"addMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getSecond\",\"outputs\":[{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"addSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"_daysToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getYear\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"subMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMonth\",\"outputs\":[{\"name\":\"month\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"subMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"_isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"subDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffDays\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekDay\",\"outputs\":[{\"name\":\"weekDay\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDateTime\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"subSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMinute\",\"outputs\":[{\"name\":\"minute\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffYears\",\"outputs\":[{\"name\":\"_years\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]",
- "bin" : "610a38610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106101c15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166250155381146101c657806310848ddf146101e65780631e0582e9146101f15780631f4f77b21461020257806322f8a2b8146102135780633e239e1a1461021e5780633f9e0eb7146102295780634355644d146102375780634371c46514610245578063442b8c7914610264578063444fda82146102725780634b321502146102805780635e05bd6d1461028e57806365c72840146102a85780637217523c146102b35780637be34109146102c157806389a3a00d146102cf5780638aa001fc146102dd5780638d4a2d39146102e857806390059aed146102f657806392d663131461031f5780639e524caa1461032a578063a324ad2414610338578063ad203bd414610343578063b05eb08d14610351578063b8d16dbc1461035c578063c7b6fd6a14610367578063c9d3462214610375578063d6582d0d14610383578063de5101af1461038e578063ea1c169014610399578063f615ed54146103d7578063fa93f883146103e5578063ff2258cb146103f0575b600080fd5b6101d46004356024356103fe565b60408051918252519081900360200190f35b6101d4600435610418565b6101d4600435602435604435610446565b6101d460043560243560443561049a565b6101d46004356104b4565b6101d46004356104c7565b6101d46004356024356104dc565b6101d4600435602435610562565b6102506004356105d8565b604080519115158252519081900360200190f35b6101d46004356024356105ed565b6101d4600435602435610613565b6101d460043560243561066e565b6101d460043560243560443560643560843560a435610682565b6101d46004356106ac565b6101d46004356024356106c7565b6101d46004356024356106dc565b6101d4600435602435610730565b6101d4600435610743565b6101d460043560243561074a565b61030160043561075a565b60408051938452602084019290925282820152519081900360600190f35b6101d46004356107ef565b6101d460043560243561080b565b6101d460043561081e565b6101d4600435602435610839565b6102506004356108ba565b6102506004356108df565b6101d4600435602435610901565b6101d4600435602435610916565b610250600435610931565b610301600435610946565b6103a4600435610964565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b6101d46004356024356109a5565b6101d46004356109b5565b6101d46004356024356109c4565b610e10810282038281111561041257600080fd5b92915050565b600080808061042c62015180865b0461075a565b9194509250905061043d83836104dc565b95945050505050565b6225bad61960046064600c600d1986018190059687016113248101929092056003028390056112c09092016105b502929092059093016001199582029094039490940161016f029390930591909101030190565b6000620151806104ab858585610446565b02949350505050565b6007620151809091046003010660010190565b6000620151808206610e10815b049392505050565b600081600114806104ed5750816003145b806104f85750816005145b806105035750816007145b8061050e5750816008145b80610519575081600a145b80610524575081600c145b156105315750601f610412565b600282146105415750601e610412565b61054a836108ba565b61055557601c610558565b601d5b60ff169392505050565b6000808080806105756201518088610426565b600c9189016000190182810493909301965091066001019350915061059a84846104dc565b9050808211156105a8578091505b620151808706620151806105bd868686610446565b02019450868510156105ce57600080fd5b5050505092915050565b600060066105e5836104b4565b101592915050565b6000808080806106006201518088610426565b91880195509350915061059a84846104dc565b6000808080806106266201518088610426565b9188900395509350915061063a84846104dc565b905080821115610648578091505b6201518087066201518061065d868686610446565b02019450868511156105ce57600080fd5b610e10810282018281101561041257600080fd5b600081603c8402610e1086026201518061069d8b8b8b610446565b02010101979650505050505050565b600080806106bd6201518085610426565b9695505050505050565b62015180810282018281101561041257600080fd5b6000808080808080878911156106f157600080fd5b6106fe620151808a610426565b919750955093506107126201518089610426565b50600c97880297909102019590950393909303979650505050505050565b603c810282018281101561041257600080fd5b603c900690565b8181018281101561041257600080fd5b60008080836226496581018280808062023ab1600486020593506004600362023ab1860201059094039362164b09610fa0600187010205925060046105b58402058503601f01945061098f856050028115156107b257fe5b059150605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b600080806108006201518085610426565b509095945050505050565b603c810282038281111561041257600080fd5b6000808061082f6201518085610426565b5095945050505050565b6000808080808061084d6201518089610426565b91965094509250600c808602850188900360001901925082049450600c8206600101935061087b85856104dc565b905080831115610889578092505b6201518088066201518061089e878787610446565b02019550878611156108af57600080fd5b505050505092915050565b6000600482061580156108cf57506064820615155b8061041257505061019090061590565b60008080806108f16201518086610426565b9194509250905061043d836108ba565b62015180810282038281111561041257600080fd5b60008183111561092557600080fd5b50620151809190030490565b6000600561093e836104b4565b111592915050565b600080806109576201518085610426565b9196909550909350915050565b60008080808080806109796201518089610426565b919a9099919850610e10620151809092068281049850603c929006828104975091909106945092505050565b8082038281111561041257600080fd5b6000610e108206603c816104d4565b6000808080808080878911156109d957600080fd5b6109e6620151808a610426565b919750955093506109fa6201518089610426565b505095909503989750505050505050505600a165627a7a72305820dc57ef955b56a0fe2ff21d945a382880176bbcc29bb5293ae673a3a29b85c25c0029"
+ "abi" : "[{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"subHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMinutes\",\"outputs\":[{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"_daysFromDate\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"timestampFromDate\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDayOfWeek\",\"outputs\":[{\"name\":\"dayOfWeek\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffHours\",\"outputs\":[{\"name\":\"_hours\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getHour\",\"outputs\":[{\"name\":\"hour\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"}],\"name\":\"_getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"addMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekEnd\",\"outputs\":[{\"name\":\"weekEnd\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"addYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"subYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"addHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"name\":\"timestampFromDateTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffSeconds\",\"outputs\":[{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDay\",\"outputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"addDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMonths\",\"outputs\":[{\"name\":\"_months\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"addMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getSecond\",\"outputs\":[{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"addSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"_daysToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getYear\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"subMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMonth\",\"outputs\":[{\"name\":\"month\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"subMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"_isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"subDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffDays\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekDay\",\"outputs\":[{\"name\":\"weekDay\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDateTime\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"subSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMinute\",\"outputs\":[{\"name\":\"minute\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffYears\",\"outputs\":[{\"name\":\"_years\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]",
+ "bin" : "610ac7610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106101e25763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166250155381146101e757806302e98e0d1461020757806310848ddf146102155780631e0582e9146102205780631f4f77b21461023157806322f8a2b8146102425780632af123b81461024d5780633e239e1a1461025b5780633f9e0eb7146102665780634355644d146102745780634371c46514610282578063442b8c79146102a1578063444fda82146102af5780634b321502146102bd5780635e05bd6d146102cb57806362fb9697146102e557806365c72840146102f35780637217523c146102fe5780637be341091461030c57806389a3a00d1461031a5780638aa001fc146103285780638d4a2d391461033357806390059aed1461034157806392d663131461036a5780639e524caa14610375578063a324ad2414610383578063ad203bd41461038e578063b05eb08d1461039c578063b8d16dbc146103a7578063c7b6fd6a146103b2578063c9d34622146103c0578063d6582d0d146103ce578063de5101af146103d9578063ea1c1690146103e4578063f615ed5414610422578063fa93f88314610430578063ff2258cb1461043b575b600080fd5b6101f5600435602435610449565b60408051918252519081900360200190f35b6101f5600435602435610463565b6101f5600435610480565b6101f56004356024356044356104ae565b6101f5600435602435604435610502565b6101f560043561051c565b6101f560043560243561052f565b6101f5600435610549565b6101f5600435602435610557565b6101f56004356024356105dd565b61028d600435610653565b604080519115158252519081900360200190f35b6101f5600435602435610668565b6101f560043560243561068e565b6101f56004356024356106e9565b6101f560043560243560443560643560843560a4356106fd565b6101f5600435602435610727565b6101f560043561073b565b6101f5600435602435610756565b6101f560043560243561076b565b6101f56004356024356107bf565b6101f56004356107d2565b6101f56004356024356107d9565b61034c6004356107e9565b60408051938452602084019290925282820152519081900360600190f35b6101f560043561087e565b6101f560043560243561089a565b6101f56004356108ad565b6101f56004356024356108c8565b61028d600435610949565b61028d60043561096e565b6101f5600435602435610990565b6101f56004356024356109a5565b61028d6004356109c0565b61034c6004356109d5565b6103ef6004356109f3565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b6101f5600435602435610a34565b6101f5600435610a44565b6101f5600435602435610a53565b610e10810282038281111561045d57600080fd5b92915050565b60008183111561047257600080fd5b603c8383035b049392505050565b600080808061049462015180865b046107e9565b919450925090506104a58383610557565b95945050505050565b6225bad61960046064600c600d1986018190059687016113248101929092056003028390056112c09092016105b502929092059093016001199582029094039490940161016f029390930591909101030190565b6000620151806105138585856104ae565b02949350505050565b6007620151809091046003010660010190565b60008183111561053e57600080fd5b610e10838303610478565b610e10620151809091060490565b600081600114806105685750816003145b806105735750816005145b8061057e5750816007145b806105895750816008145b80610594575081600a145b8061059f575081600c145b156105ac5750601f61045d565b600282146105bc5750601e61045d565b6105c583610949565b6105d057601c6105d3565b601d5b60ff169392505050565b6000808080806105f0620151808861048e565b600c918901600019018281049390930196509106600101935091506106158484610557565b905080821115610623578091505b620151808706620151806106388686866104ae565b020194508685101561064957600080fd5b5050505092915050565b600060066106608361051c565b101592915050565b60008080808061067b620151808861048e565b9188019550935091506106158484610557565b6000808080806106a1620151808861048e565b918890039550935091506106b58484610557565b9050808211156106c3578091505b620151808706620151806106d88686866104ae565b020194508685111561064957600080fd5b610e10810282018281101561045d57600080fd5b600081603c8402610e108602620151806107188b8b8b6104ae565b02010101979650505050505050565b60008183111561073657600080fd5b500390565b6000808061074c620151808561048e565b9695505050505050565b62015180810282018281101561045d57600080fd5b60008080808080808789111561078057600080fd5b61078d620151808a61048e565b919750955093506107a1620151808961048e565b50600c97880297909102019590950393909303979650505050505050565b603c810282018281101561045d57600080fd5b603c900690565b8181018281101561045d57600080fd5b60008080836226496581018280808062023ab1600486020593506004600362023ab1860201059094039362164b09610fa0600187010205925060046105b58402058503601f01945061098f8560500281151561084157fe5b059150605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b6000808061088f620151808561048e565b509095945050505050565b603c810282038281111561045d57600080fd5b600080806108be620151808561048e565b5095945050505050565b600080808080806108dc620151808961048e565b91965094509250600c808602850188900360001901925082049450600c8206600101935061090a8585610557565b905080831115610918578092505b6201518088066201518061092d8787876104ae565b020195508786111561093e57600080fd5b505050505092915050565b60006004820615801561095e57506064820615155b8061045d57505061019090061590565b6000808080610980620151808661048e565b919450925090506104a583610949565b62015180810282038281111561045d57600080fd5b6000818311156109b457600080fd5b62015180838303610478565b600060056109cd8361051c565b111592915050565b600080806109e6620151808561048e565b9196909550909350915050565b6000808080808080610a08620151808961048e565b919a9099919850610e10620151809092068281049850603c929006828104975091909106945092505050565b8082038281111561045d57600080fd5b6000610e108206603c81610478565b600080808080808087891115610a6857600080fd5b610a75620151808a61048e565b91975095509350610a89620151808961048e565b505095909503989750505050505050505600a165627a7a72305820290427543f68caf0d50b881c916c41a35299ece11ef435a12528c027419a4db80029"
}
},
"version" : "0.4.24+commit.e67f0147.Darwin.appleclang"
diff --git a/test/BokkyPooBahsDateTimeLibrary.sol b/test/BokkyPooBahsDateTimeLibrary.sol
index 0d3719f..55a29cf 100644
--- a/test/BokkyPooBahsDateTimeLibrary.sol
+++ b/test/BokkyPooBahsDateTimeLibrary.sol
@@ -30,9 +30,9 @@ pragma solidity ^0.4.23;
library BokkyPooBahsDateTimeLibrary {
- uint constant SECONDS_PER_MINUTE = 60;
- uint constant SECONDS_PER_HOUR = 60 * 60;
uint constant SECONDS_PER_DAY = 24 * 60 * 60;
+ uint constant SECONDS_PER_HOUR = 60 * 60;
+ uint constant SECONDS_PER_MINUTE = 60;
int constant OFFSET19700101 = 2440588;
uint constant DOW_MON = 1;
@@ -280,11 +280,7 @@ library BokkyPooBahsDateTimeLibrary {
require(newTimestamp <= timestamp);
}
- function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
- require(fromTimestamp <= toTimestamp);
- _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;
- }
- function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months) {
+ function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
require(fromTimestamp <= toTimestamp);
uint fromYear;
uint fromMonth;
@@ -294,9 +290,9 @@ library BokkyPooBahsDateTimeLibrary {
uint toDay;
(fromYear, fromMonth, fromDay) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
(toYear, toMonth, toDay) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
- _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;
+ _years = toYear - fromYear;
}
- function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
+ function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months) {
require(fromTimestamp <= toTimestamp);
uint fromYear;
uint fromMonth;
@@ -306,6 +302,22 @@ library BokkyPooBahsDateTimeLibrary {
uint toDay;
(fromYear, fromMonth, fromDay) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
(toYear, toMonth, toDay) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
- _years = toYear - fromYear;
+ _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;
+ }
+ function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
+ require(fromTimestamp <= toTimestamp);
+ _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;
+ }
+ function diffHours(uint fromTimestamp, uint toTimestamp) public pure returns (uint _hours) {
+ require(fromTimestamp <= toTimestamp);
+ _hours = (toTimestamp - fromTimestamp) / SECONDS_PER_HOUR;
+ }
+ function diffMinutes(uint fromTimestamp, uint toTimestamp) public pure returns (uint _minutes) {
+ require(fromTimestamp <= toTimestamp);
+ _minutes = (toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE;
+ }
+ function diffSeconds(uint fromTimestamp, uint toTimestamp) public pure returns (uint _seconds) {
+ require(fromTimestamp <= toTimestamp);
+ _seconds = toTimestamp - fromTimestamp;
}
}
\ No newline at end of file
diff --git a/test/TestDateTime.js b/test/TestDateTime.js
index e4b281b..3d3129a 100644
--- a/test/TestDateTime.js
+++ b/test/TestDateTime.js
@@ -3,13 +3,13 @@ var testDateTimeOutput={
{
"BokkyPooBahsDateTimeLibrary.sol:BokkyPooBahsDateTimeLibrary" :
{
- "abi" : "[{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"subHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"_daysFromDate\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"timestampFromDate\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDayOfWeek\",\"outputs\":[{\"name\":\"dayOfWeek\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getHour\",\"outputs\":[{\"name\":\"hour\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"}],\"name\":\"_getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"addMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekEnd\",\"outputs\":[{\"name\":\"weekEnd\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"addYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"subYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"addHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"name\":\"timestampFromDateTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDay\",\"outputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"addDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMonths\",\"outputs\":[{\"name\":\"_months\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"addMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getSecond\",\"outputs\":[{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"addSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"_daysToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getYear\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"subMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMonth\",\"outputs\":[{\"name\":\"month\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"subMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"_isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"subDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffDays\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekDay\",\"outputs\":[{\"name\":\"weekDay\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDateTime\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"subSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMinute\",\"outputs\":[{\"name\":\"minute\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffYears\",\"outputs\":[{\"name\":\"_years\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]",
- "bin" : "610a38610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106101c15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166250155381146101c657806310848ddf146101e65780631e0582e9146101f15780631f4f77b21461020257806322f8a2b8146102135780633e239e1a1461021e5780633f9e0eb7146102295780634355644d146102375780634371c46514610245578063442b8c7914610264578063444fda82146102725780634b321502146102805780635e05bd6d1461028e57806365c72840146102a85780637217523c146102b35780637be34109146102c157806389a3a00d146102cf5780638aa001fc146102dd5780638d4a2d39146102e857806390059aed146102f657806392d663131461031f5780639e524caa1461032a578063a324ad2414610338578063ad203bd414610343578063b05eb08d14610351578063b8d16dbc1461035c578063c7b6fd6a14610367578063c9d3462214610375578063d6582d0d14610383578063de5101af1461038e578063ea1c169014610399578063f615ed54146103d7578063fa93f883146103e5578063ff2258cb146103f0575b600080fd5b6101d46004356024356103fe565b60408051918252519081900360200190f35b6101d4600435610418565b6101d4600435602435604435610446565b6101d460043560243560443561049a565b6101d46004356104b4565b6101d46004356104c7565b6101d46004356024356104dc565b6101d4600435602435610562565b6102506004356105d8565b604080519115158252519081900360200190f35b6101d46004356024356105ed565b6101d4600435602435610613565b6101d460043560243561066e565b6101d460043560243560443560643560843560a435610682565b6101d46004356106ac565b6101d46004356024356106c7565b6101d46004356024356106dc565b6101d4600435602435610730565b6101d4600435610743565b6101d460043560243561074a565b61030160043561075a565b60408051938452602084019290925282820152519081900360600190f35b6101d46004356107ef565b6101d460043560243561080b565b6101d460043561081e565b6101d4600435602435610839565b6102506004356108ba565b6102506004356108df565b6101d4600435602435610901565b6101d4600435602435610916565b610250600435610931565b610301600435610946565b6103a4600435610964565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b6101d46004356024356109a5565b6101d46004356109b5565b6101d46004356024356109c4565b610e10810282038281111561041257600080fd5b92915050565b600080808061042c62015180865b0461075a565b9194509250905061043d83836104dc565b95945050505050565b6225bad61960046064600c600d1986018190059687016113248101929092056003028390056112c09092016105b502929092059093016001199582029094039490940161016f029390930591909101030190565b6000620151806104ab858585610446565b02949350505050565b6007620151809091046003010660010190565b6000620151808206610e10815b049392505050565b600081600114806104ed5750816003145b806104f85750816005145b806105035750816007145b8061050e5750816008145b80610519575081600a145b80610524575081600c145b156105315750601f610412565b600282146105415750601e610412565b61054a836108ba565b61055557601c610558565b601d5b60ff169392505050565b6000808080806105756201518088610426565b600c9189016000190182810493909301965091066001019350915061059a84846104dc565b9050808211156105a8578091505b620151808706620151806105bd868686610446565b02019450868510156105ce57600080fd5b5050505092915050565b600060066105e5836104b4565b101592915050565b6000808080806106006201518088610426565b91880195509350915061059a84846104dc565b6000808080806106266201518088610426565b9188900395509350915061063a84846104dc565b905080821115610648578091505b6201518087066201518061065d868686610446565b02019450868511156105ce57600080fd5b610e10810282018281101561041257600080fd5b600081603c8402610e1086026201518061069d8b8b8b610446565b02010101979650505050505050565b600080806106bd6201518085610426565b9695505050505050565b62015180810282018281101561041257600080fd5b6000808080808080878911156106f157600080fd5b6106fe620151808a610426565b919750955093506107126201518089610426565b50600c97880297909102019590950393909303979650505050505050565b603c810282018281101561041257600080fd5b603c900690565b8181018281101561041257600080fd5b60008080836226496581018280808062023ab1600486020593506004600362023ab1860201059094039362164b09610fa0600187010205925060046105b58402058503601f01945061098f856050028115156107b257fe5b059150605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b600080806108006201518085610426565b509095945050505050565b603c810282038281111561041257600080fd5b6000808061082f6201518085610426565b5095945050505050565b6000808080808061084d6201518089610426565b91965094509250600c808602850188900360001901925082049450600c8206600101935061087b85856104dc565b905080831115610889578092505b6201518088066201518061089e878787610446565b02019550878611156108af57600080fd5b505050505092915050565b6000600482061580156108cf57506064820615155b8061041257505061019090061590565b60008080806108f16201518086610426565b9194509250905061043d836108ba565b62015180810282038281111561041257600080fd5b60008183111561092557600080fd5b50620151809190030490565b6000600561093e836104b4565b111592915050565b600080806109576201518085610426565b9196909550909350915050565b60008080808080806109796201518089610426565b919a9099919850610e10620151809092068281049850603c929006828104975091909106945092505050565b8082038281111561041257600080fd5b6000610e108206603c816104d4565b6000808080808080878911156109d957600080fd5b6109e6620151808a610426565b919750955093506109fa6201518089610426565b505095909503989750505050505050505600a165627a7a72305820dc57ef955b56a0fe2ff21d945a382880176bbcc29bb5293ae673a3a29b85c25c0029"
+ "abi" : "[{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"subHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMinutes\",\"outputs\":[{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"_daysFromDate\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"timestampFromDate\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDayOfWeek\",\"outputs\":[{\"name\":\"dayOfWeek\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffHours\",\"outputs\":[{\"name\":\"_hours\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getHour\",\"outputs\":[{\"name\":\"hour\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"}],\"name\":\"_getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"addMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekEnd\",\"outputs\":[{\"name\":\"weekEnd\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"addYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"subYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"addHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"name\":\"timestampFromDateTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffSeconds\",\"outputs\":[{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDay\",\"outputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"addDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMonths\",\"outputs\":[{\"name\":\"_months\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"addMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getSecond\",\"outputs\":[{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"addSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"_daysToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getYear\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"subMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMonth\",\"outputs\":[{\"name\":\"month\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"subMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"_isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"subDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffDays\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekDay\",\"outputs\":[{\"name\":\"weekDay\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDateTime\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"subSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMinute\",\"outputs\":[{\"name\":\"minute\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffYears\",\"outputs\":[{\"name\":\"_years\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]",
+ "bin" : "610ac7610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600436106101e25763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166250155381146101e757806302e98e0d1461020757806310848ddf146102155780631e0582e9146102205780631f4f77b21461023157806322f8a2b8146102425780632af123b81461024d5780633e239e1a1461025b5780633f9e0eb7146102665780634355644d146102745780634371c46514610282578063442b8c79146102a1578063444fda82146102af5780634b321502146102bd5780635e05bd6d146102cb57806362fb9697146102e557806365c72840146102f35780637217523c146102fe5780637be341091461030c57806389a3a00d1461031a5780638aa001fc146103285780638d4a2d391461033357806390059aed1461034157806392d663131461036a5780639e524caa14610375578063a324ad2414610383578063ad203bd41461038e578063b05eb08d1461039c578063b8d16dbc146103a7578063c7b6fd6a146103b2578063c9d34622146103c0578063d6582d0d146103ce578063de5101af146103d9578063ea1c1690146103e4578063f615ed5414610422578063fa93f88314610430578063ff2258cb1461043b575b600080fd5b6101f5600435602435610449565b60408051918252519081900360200190f35b6101f5600435602435610463565b6101f5600435610480565b6101f56004356024356044356104ae565b6101f5600435602435604435610502565b6101f560043561051c565b6101f560043560243561052f565b6101f5600435610549565b6101f5600435602435610557565b6101f56004356024356105dd565b61028d600435610653565b604080519115158252519081900360200190f35b6101f5600435602435610668565b6101f560043560243561068e565b6101f56004356024356106e9565b6101f560043560243560443560643560843560a4356106fd565b6101f5600435602435610727565b6101f560043561073b565b6101f5600435602435610756565b6101f560043560243561076b565b6101f56004356024356107bf565b6101f56004356107d2565b6101f56004356024356107d9565b61034c6004356107e9565b60408051938452602084019290925282820152519081900360600190f35b6101f560043561087e565b6101f560043560243561089a565b6101f56004356108ad565b6101f56004356024356108c8565b61028d600435610949565b61028d60043561096e565b6101f5600435602435610990565b6101f56004356024356109a5565b61028d6004356109c0565b61034c6004356109d5565b6103ef6004356109f3565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b6101f5600435602435610a34565b6101f5600435610a44565b6101f5600435602435610a53565b610e10810282038281111561045d57600080fd5b92915050565b60008183111561047257600080fd5b603c8383035b049392505050565b600080808061049462015180865b046107e9565b919450925090506104a58383610557565b95945050505050565b6225bad61960046064600c600d1986018190059687016113248101929092056003028390056112c09092016105b502929092059093016001199582029094039490940161016f029390930591909101030190565b6000620151806105138585856104ae565b02949350505050565b6007620151809091046003010660010190565b60008183111561053e57600080fd5b610e10838303610478565b610e10620151809091060490565b600081600114806105685750816003145b806105735750816005145b8061057e5750816007145b806105895750816008145b80610594575081600a145b8061059f575081600c145b156105ac5750601f61045d565b600282146105bc5750601e61045d565b6105c583610949565b6105d057601c6105d3565b601d5b60ff169392505050565b6000808080806105f0620151808861048e565b600c918901600019018281049390930196509106600101935091506106158484610557565b905080821115610623578091505b620151808706620151806106388686866104ae565b020194508685101561064957600080fd5b5050505092915050565b600060066106608361051c565b101592915050565b60008080808061067b620151808861048e565b9188019550935091506106158484610557565b6000808080806106a1620151808861048e565b918890039550935091506106b58484610557565b9050808211156106c3578091505b620151808706620151806106d88686866104ae565b020194508685111561064957600080fd5b610e10810282018281101561045d57600080fd5b600081603c8402610e108602620151806107188b8b8b6104ae565b02010101979650505050505050565b60008183111561073657600080fd5b500390565b6000808061074c620151808561048e565b9695505050505050565b62015180810282018281101561045d57600080fd5b60008080808080808789111561078057600080fd5b61078d620151808a61048e565b919750955093506107a1620151808961048e565b50600c97880297909102019590950393909303979650505050505050565b603c810282018281101561045d57600080fd5b603c900690565b8181018281101561045d57600080fd5b60008080836226496581018280808062023ab1600486020593506004600362023ab1860201059094039362164b09610fa0600187010205925060046105b58402058503601f01945061098f8560500281151561084157fe5b059150605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b6000808061088f620151808561048e565b509095945050505050565b603c810282038281111561045d57600080fd5b600080806108be620151808561048e565b5095945050505050565b600080808080806108dc620151808961048e565b91965094509250600c808602850188900360001901925082049450600c8206600101935061090a8585610557565b905080831115610918578092505b6201518088066201518061092d8787876104ae565b020195508786111561093e57600080fd5b505050505092915050565b60006004820615801561095e57506064820615155b8061045d57505061019090061590565b6000808080610980620151808661048e565b919450925090506104a583610949565b62015180810282038281111561045d57600080fd5b6000818311156109b457600080fd5b62015180838303610478565b600060056109cd8361051c565b111592915050565b600080806109e6620151808561048e565b9196909550909350915050565b6000808080808080610a08620151808961048e565b919a9099919850610e10620151809092068281049850603c929006828104975091909106945092505050565b8082038281111561045d57600080fd5b6000610e108206603c81610478565b600080808080808087891115610a6857600080fd5b610a75620151808a61048e565b91975095509350610a89620151808961048e565b505095909503989750505050505050505600a165627a7a72305820290427543f68caf0d50b881c916c41a35299ece11ef435a12528c027419a4db80029"
},
"TestDateTime.sol:TestDateTime" :
{
- "abi" : "[{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"subHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextYear\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"timestampFromDate\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDayOfWeek\",\"outputs\":[{\"name\":\"dayOfWeek\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getHour\",\"outputs\":[{\"name\":\"hour\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"}],\"name\":\"_getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"addMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekEnd\",\"outputs\":[{\"name\":\"weekEnd\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"addYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"subYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"addHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"name\":\"timestampFromDateTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDay\",\"outputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"addDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMonths\",\"outputs\":[{\"name\":\"_months\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"addMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getSecond\",\"outputs\":[{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"addSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getYear\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"subMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMonth\",\"outputs\":[{\"name\":\"month\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"subMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"_isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"subDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffDays\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekDay\",\"outputs\":[{\"name\":\"weekDay\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDateTime\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"subSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"test\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMinute\",\"outputs\":[{\"name\":\"minute\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffYears\",\"outputs\":[{\"name\":\"_years\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]",
- "bin" : "608060405234801561001057600080fd5b5061131b806100206000396000f3006080604052600436106101915763ffffffff60e060020a600035041662501553811461019657806310848ddf146101c3578063146bea7b146101db5780631f4f77b2146101f057806322f8a2b81461020e5780633e239e1a146102265780633f9e0eb71461023e5780634355644d146102595780634371c46514610274578063442b8c79146102a0578063444fda82146102bb5780634b321502146102d65780635e05bd6d146102f157806365c72840146103185780637217523c146103305780637be341091461034b57806389a3a00d146103665780638aa001fc146103815780638d4a2d391461039957806392d66313146103b45780639e524caa146103cc578063a324ad24146103e7578063ad203bd4146103ff578063b05eb08d1461041a578063b8d16dbc14610432578063c7b6fd6a1461044a578063c9d3462214610465578063d6582d0d14610480578063de5101af14610498578063ea1c1690146104ce578063f615ed5414610519578063f8a8fd6d14610534578063fa93f8831461054b578063ff2258cb14610563575b600080fd5b3480156101a257600080fd5b506101b160043560243561057e565b60408051918252519081900360200190f35b3480156101cf57600080fd5b506101b160043561060c565b3480156101e757600080fd5b506101b1610692565b3480156101fc57600080fd5b506101b1600435602435604435610698565b34801561021a57600080fd5b506101b1600435610730565b34801561023257600080fd5b506101b1600435610784565b34801561024a57600080fd5b506101b16004356024356107d8565b34801561026557600080fd5b506101b1600435602435610834565b34801561028057600080fd5b5061028c600435610890565b604080519115158252519081900360200190f35b3480156102ac57600080fd5b506101b16004356024356108e4565b3480156102c757600080fd5b506101b1600435602435610940565b3480156102e257600080fd5b506101b160043560243561099c565b3480156102fd57600080fd5b506101b160043560243560443560643560843560a4356109f8565b34801561032457600080fd5b506101b1600435610ac1565b34801561033c57600080fd5b506101b1600435602435610b15565b34801561035757600080fd5b506101b1600435602435610b71565b34801561037257600080fd5b506101b1600435602435610bcd565b34801561038d57600080fd5b506101b1600435610c29565b3480156103a557600080fd5b506101b1600435602435610c7d565b3480156103c057600080fd5b506101b1600435610cd9565b3480156103d857600080fd5b506101b1600435602435610d2d565b3480156103f357600080fd5b506101b1600435610d89565b34801561040b57600080fd5b506101b1600435602435610ddd565b34801561042657600080fd5b5061028c600435610e39565b34801561043e57600080fd5b5061028c600435610e8d565b34801561045657600080fd5b506101b1600435602435610ee1565b34801561047157600080fd5b506101b1600435602435610f3d565b34801561048c57600080fd5b5061028c600435610f99565b3480156104a457600080fd5b506104b0600435610fed565b60408051938452602084019290925282820152519081900360600190f35b3480156104da57600080fd5b506104e6600435611088565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561052557600080fd5b506101b160043560243561113e565b34801561054057600080fd5b5061054961119a565b005b34801561055757600080fd5b506101b160043561123f565b34801561056f57600080fd5b506101b1600435602435611293565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6250155384846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b505af41580156105ed573d6000803e3d6000fd5b505050506040513d602081101561060357600080fd5b50519392505050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6310848ddf836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b505af4158015610674573d6000803e3d6000fd5b505050506040513d602081101561068a57600080fd5b505192915050565b60005481565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__631f4f77b28585856040518463ffffffff1660e060020a02815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156106fc57600080fd5b505af4158015610710573d6000803e3d6000fd5b505050506040513d602081101561072657600080fd5b5051949350505050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6322f8a2b8836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__633e239e1a836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__633f9e0eb784846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__634355644d84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__634371c465836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63442b8c7984846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63444fda8284846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__634b32150284846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b604080517f5e05bd6d000000000000000000000000000000000000000000000000000000008152600481018890526024810187905260448101869052606481018590526084810184905260a48101839052905160009173__BokkyPooBahsDateTimeLibrary.sol:Bokk__91635e05bd6d9160c480820192602092909190829003018186803b158015610a8a57600080fd5b505af4158015610a9e573d6000803e3d6000fd5b505050506040513d6020811015610ab457600080fd5b5051979650505050505050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6365c72840836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__637217523c84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__637be3410984846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6389a3a00d84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__638aa001fc836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__638d4a2d3984846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6392d66313836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__639e524caa84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63a324ad24836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63ad203bd484846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63b05eb08d836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63b8d16dbc836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63c7b6fd6a84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63c9d3462284846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63d6582d0d836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600080600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63de5101af856040518263ffffffff1660e060020a0281526004018082815260200191505060606040518083038186803b15801561104457600080fd5b505af4158015611058573d6000803e3d6000fd5b505050506040513d606081101561106e57600080fd5b508051602082015160409092015190969195509350915050565b60008060008060008073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63ea1c1690886040518263ffffffff1660e060020a0281526004018082815260200191505060c06040518083038186803b1580156110e357600080fd5b505af41580156110f7573d6000803e3d6000fd5b505050506040513d60c081101561110d57600080fd5b508051602082015160408301516060840151608085015160a090950151939c929b5090995097509195509350915050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63f615ed5484846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd5b604080517f442b8c79000000000000000000000000000000000000000000000000000000008152426004820181905260016024830152915173__BokkyPooBahsDateTimeLibrary.sol:Bokk__9163442b8c79916044808301926020929190829003018186803b15801561120d57600080fd5b505af4158015611221573d6000803e3d6000fd5b505050506040513d602081101561123757600080fd5b505160005550565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63fa93f883836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561066057600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63ff2258cb84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b1580156105d957600080fd00a165627a7a72305820a6a3c68fe309689c27f4fea33aaeaef07663d2d55932ee584f76415551af4ee10029"
+ "abi" : "[{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"subHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMinutes\",\"outputs\":[{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextYear\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"name\":\"timestampFromDate\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDayOfWeek\",\"outputs\":[{\"name\":\"dayOfWeek\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffHours\",\"outputs\":[{\"name\":\"_hours\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getHour\",\"outputs\":[{\"name\":\"hour\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"}],\"name\":\"_getDaysInMonth\",\"outputs\":[{\"name\":\"daysInMonth\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"addMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekEnd\",\"outputs\":[{\"name\":\"weekEnd\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"addYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_years\",\"type\":\"uint256\"}],\"name\":\"subYears\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_hours\",\"type\":\"uint256\"}],\"name\":\"addHours\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"name\":\"timestampFromDateTime\",\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffSeconds\",\"outputs\":[{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getDay\",\"outputs\":[{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"addDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffMonths\",\"outputs\":[{\"name\":\"_months\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"addMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getSecond\",\"outputs\":[{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"addSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getYear\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_minutes\",\"type\":\"uint256\"}],\"name\":\"subMinutes\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMonth\",\"outputs\":[{\"name\":\"month\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_months\",\"type\":\"uint256\"}],\"name\":\"subMonths\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"year\",\"type\":\"uint256\"}],\"name\":\"_isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isLeapYear\",\"outputs\":[{\"name\":\"leapYear\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_days\",\"type\":\"uint256\"}],\"name\":\"subDays\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffDays\",\"outputs\":[{\"name\":\"_days\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"isWeekDay\",\"outputs\":[{\"name\":\"weekDay\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDate\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"timestampToDateTime\",\"outputs\":[{\"name\":\"year\",\"type\":\"uint256\"},{\"name\":\"month\",\"type\":\"uint256\"},{\"name\":\"day\",\"type\":\"uint256\"},{\"name\":\"hour\",\"type\":\"uint256\"},{\"name\":\"minute\",\"type\":\"uint256\"},{\"name\":\"second\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"},{\"name\":\"_seconds\",\"type\":\"uint256\"}],\"name\":\"subSeconds\",\"outputs\":[{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"test\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getMinute\",\"outputs\":[{\"name\":\"minute\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"fromTimestamp\",\"type\":\"uint256\"},{\"name\":\"toTimestamp\",\"type\":\"uint256\"}],\"name\":\"diffYears\",\"outputs\":[{\"name\":\"_years\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}]",
+ "bin" : "608060405234801561001057600080fd5b506114a1806100206000396000f3006080604052600436106101b25763ffffffff60e060020a60003504166250155381146101b757806302e98e0d146101e457806310848ddf146101ff578063146bea7b146102175780631f4f77b21461022c57806322f8a2b81461024a5780632af123b8146102625780633e239e1a1461027d5780633f9e0eb7146102955780634355644d146102b05780634371c465146102cb578063442b8c79146102f7578063444fda82146103125780634b3215021461032d5780635e05bd6d1461034857806362fb96971461036f57806365c728401461038a5780637217523c146103a25780637be34109146103bd57806389a3a00d146103d85780638aa001fc146103f35780638d4a2d391461040b57806392d66313146104265780639e524caa1461043e578063a324ad2414610459578063ad203bd414610471578063b05eb08d1461048c578063b8d16dbc146104a4578063c7b6fd6a146104bc578063c9d34622146104d7578063d6582d0d146104f2578063de5101af1461050a578063ea1c169014610540578063f615ed541461058b578063f8a8fd6d146105a6578063fa93f883146105bd578063ff2258cb146105d5575b600080fd5b3480156101c357600080fd5b506101d26004356024356105f0565b60408051918252519081900360200190f35b3480156101f057600080fd5b506101d260043560243561067e565b34801561020b57600080fd5b506101d26004356106da565b34801561022357600080fd5b506101d2610760565b34801561023857600080fd5b506101d2600435602435604435610766565b34801561025657600080fd5b506101d26004356107fe565b34801561026e57600080fd5b506101d2600435602435610852565b34801561028957600080fd5b506101d26004356108ae565b3480156102a157600080fd5b506101d2600435602435610902565b3480156102bc57600080fd5b506101d260043560243561095e565b3480156102d757600080fd5b506102e36004356109ba565b604080519115158252519081900360200190f35b34801561030357600080fd5b506101d2600435602435610a0e565b34801561031e57600080fd5b506101d2600435602435610a6a565b34801561033957600080fd5b506101d2600435602435610ac6565b34801561035457600080fd5b506101d260043560243560443560643560843560a435610b22565b34801561037b57600080fd5b506101d2600435602435610beb565b34801561039657600080fd5b506101d2600435610c47565b3480156103ae57600080fd5b506101d2600435602435610c9b565b3480156103c957600080fd5b506101d2600435602435610cf7565b3480156103e457600080fd5b506101d2600435602435610d53565b3480156103ff57600080fd5b506101d2600435610daf565b34801561041757600080fd5b506101d2600435602435610e03565b34801561043257600080fd5b506101d2600435610e5f565b34801561044a57600080fd5b506101d2600435602435610eb3565b34801561046557600080fd5b506101d2600435610f0f565b34801561047d57600080fd5b506101d2600435602435610f63565b34801561049857600080fd5b506102e3600435610fbf565b3480156104b057600080fd5b506102e3600435611013565b3480156104c857600080fd5b506101d2600435602435611067565b3480156104e357600080fd5b506101d26004356024356110c3565b3480156104fe57600080fd5b506102e360043561111f565b34801561051657600080fd5b50610522600435611173565b60408051938452602084019290925282820152519081900360600190f35b34801561054c57600080fd5b5061055860043561120e565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b34801561059757600080fd5b506101d26004356024356112c4565b3480156105b257600080fd5b506105bb611320565b005b3480156105c957600080fd5b506101d26004356113c5565b3480156105e157600080fd5b506101d2600435602435611419565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6250155384846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b505af415801561065f573d6000803e3d6000fd5b505050506040513d602081101561067557600080fd5b50519392505050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6302e98e0d84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6310848ddf836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b505af4158015610742573d6000803e3d6000fd5b505050506040513d602081101561075857600080fd5b505192915050565b60005481565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__631f4f77b28585856040518463ffffffff1660e060020a02815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156107ca57600080fd5b505af41580156107de573d6000803e3d6000fd5b505050506040513d60208110156107f457600080fd5b5051949350505050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6322f8a2b8836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__632af123b884846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__633e239e1a836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__633f9e0eb784846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__634355644d84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__634371c465836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63442b8c7984846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63444fda8284846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__634b32150284846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b604080517f5e05bd6d000000000000000000000000000000000000000000000000000000008152600481018890526024810187905260448101869052606481018590526084810184905260a48101839052905160009173__BokkyPooBahsDateTimeLibrary.sol:Bokk__91635e05bd6d9160c480820192602092909190829003018186803b158015610bb457600080fd5b505af4158015610bc8573d6000803e3d6000fd5b505050506040513d6020811015610bde57600080fd5b5051979650505050505050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6362fb969784846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6365c72840836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__637217523c84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__637be3410984846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6389a3a00d84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__638aa001fc836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__638d4a2d3984846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__6392d66313836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__639e524caa84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63a324ad24836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63ad203bd484846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63b05eb08d836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63b8d16dbc836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63c7b6fd6a84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63c9d3462284846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63d6582d0d836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600080600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63de5101af856040518263ffffffff1660e060020a0281526004018082815260200191505060606040518083038186803b1580156111ca57600080fd5b505af41580156111de573d6000803e3d6000fd5b505050506040513d60608110156111f457600080fd5b508051602082015160409092015190969195509350915050565b60008060008060008073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63ea1c1690886040518263ffffffff1660e060020a0281526004018082815260200191505060c06040518083038186803b15801561126957600080fd5b505af415801561127d573d6000803e3d6000fd5b505050506040513d60c081101561129357600080fd5b508051602082015160408301516060840151608085015160a090950151939c929b5090995097509195509350915050565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63f615ed5484846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd5b604080517f442b8c79000000000000000000000000000000000000000000000000000000008152426004820181905260016024830152915173__BokkyPooBahsDateTimeLibrary.sol:Bokk__9163442b8c79916044808301926020929190829003018186803b15801561139357600080fd5b505af41580156113a7573d6000803e3d6000fd5b505050506040513d60208110156113bd57600080fd5b505160005550565b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63fa93f883836040518263ffffffff1660e060020a0281526004018082815260200191505060206040518083038186803b15801561072e57600080fd5b600073__BokkyPooBahsDateTimeLibrary.sol:Bokk__63ff2258cb84846040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561064b57600080fd00a165627a7a72305820e8faa69588a39bb3eefb854c71bd9282dba51528962a6ebc7fb6b11697c4c3270029"
}
},
"version" : "0.4.24+commit.e67f0147.Darwin.appleclang"
diff --git a/test/TestDateTime.sol b/test/TestDateTime.sol
index feb5b81..765bdaa 100644
--- a/test/TestDateTime.sol
+++ b/test/TestDateTime.sol
@@ -116,13 +116,22 @@ contract TestDateTime {
newTimestamp = BokkyPooBahsDateTimeLibrary.subSeconds(timestamp, _seconds);
}
- function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
- _days = BokkyPooBahsDateTimeLibrary.diffDays(fromTimestamp, toTimestamp);
+ function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
+ _years = BokkyPooBahsDateTimeLibrary.diffYears(fromTimestamp, toTimestamp);
}
function diffMonths(uint fromTimestamp, uint toTimestamp) public pure returns (uint _months) {
_months = BokkyPooBahsDateTimeLibrary.diffMonths(fromTimestamp, toTimestamp);
}
- function diffYears(uint fromTimestamp, uint toTimestamp) public pure returns (uint _years) {
- _years = BokkyPooBahsDateTimeLibrary.diffYears(fromTimestamp, toTimestamp);
+ function diffDays(uint fromTimestamp, uint toTimestamp) public pure returns (uint _days) {
+ _days = BokkyPooBahsDateTimeLibrary.diffDays(fromTimestamp, toTimestamp);
+ }
+ function diffHours(uint fromTimestamp, uint toTimestamp) public pure returns (uint _hours) {
+ _hours = BokkyPooBahsDateTimeLibrary.diffHours(fromTimestamp, toTimestamp);
+ }
+ function diffMinutes(uint fromTimestamp, uint toTimestamp) public pure returns (uint _minutes) {
+ _minutes = BokkyPooBahsDateTimeLibrary.diffMinutes(fromTimestamp, toTimestamp);
+ }
+ function diffSeconds(uint fromTimestamp, uint toTimestamp) public pure returns (uint _seconds) {
+ _seconds = BokkyPooBahsDateTimeLibrary.diffSeconds(fromTimestamp, toTimestamp);
}
}
\ No newline at end of file
diff --git a/test/deploymentData.js b/test/deploymentData.js
index 6f8c832..ce48404 100644
--- a/test/deploymentData.js
+++ b/test/deploymentData.js
@@ -1,7 +1,7 @@
-var dateTimeLibAddress="0xf235febef748bc1586d8aea01f093012eea7b3c8";
-var dateTimeLibAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"_daysFromDate","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_days","type":"uint256"}],"name":"_daysToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
+var dateTimeLibAddress="0x0a91add9e3e97057980da7826043aab2a2d4c35b";
+var dateTimeLibAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMinutes","outputs":[{"name":"_minutes","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"_daysFromDate","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffHours","outputs":[{"name":"_hours","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffSeconds","outputs":[{"name":"_seconds","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_days","type":"uint256"}],"name":"_daysToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
var dateTimeLib=eth.contract(dateTimeLibAbi).at(dateTimeLibAddress);
-var testDateTimeAddress="0x27daa9fe81944d721dc95e09f54c8bd3a90a5603";
-var testDateTimeAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nextYear","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"test","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
+var testDateTimeAddress="0x821ca8becdbfb00ca55e722908796a375bc2d538";
+var testDateTimeAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMinutes","outputs":[{"name":"_minutes","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nextYear","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffHours","outputs":[{"name":"_hours","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffSeconds","outputs":[{"name":"_seconds","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"test","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
var testDateTime=eth.contract(testDateTimeAbi).at(testDateTimeAddress);
console.log("testDateTime=" + JSON.stringify(testDateTime));
diff --git a/test/test1output.txt b/test/test1output.txt
index 097c2d4..22d7047 100644
--- a/test/test1output.txt
+++ b/test/test1output.txt
@@ -9,9 +9,9 @@ TESTDATETIMEJS = 'TestDateTime.js'
DEPLOYMENTDATA = 'deploymentData.js'
TEST1OUTPUT = 'test1output.txt'
TEST1RESULTS = 'test1results.txt'
-CURRENTTIME = '1527224637' 'Fri May 25 15:03:57 2018'
-START_DATE = '1527224682' 'Fri May 25 15:04:42 2018'
-END_DATE = '1527224757' 'Fri May 25 15:05:57 2018'
+CURRENTTIME = '1527269302' 'Sat May 26 03:28:22 2018'
+START_DATE = '1527269347' 'Sat May 26 03:29:07 2018'
+END_DATE = '1527269422' 'Sat May 26 03:30:22 2018'
--- Differences ../contracts/BokkyPooBahsDateTimeLibrary.sol BokkyPooBahsDateTimeLibrary.sol ---
--- Differences ../contracts/TestDateTime.sol TestDateTime.sol ---
@@ -22,7 +22,7 @@ Welcome to the Geth JavaScript console!
instance: Geth/v1.8.6-stable-12683fec/darwin-amd64/go1.10
coinbase: 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e
-at block: 25059 (Fri, 25 May 2018 15:03:57 AEST)
+at block: 261 (Sat, 26 May 2018 03:28:23 AEST)
datadir: /Users/bok/Projects/BokkyPooBahsDateTimeLibrary/test/testchain
modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 shh:1.0 txpool:1.0 web3:1.0
@@ -118,13 +118,13 @@ undefined
...
undefined
>
-DATA: var dateTimeLibAddress="0xf235febef748bc1586d8aea01f093012eea7b3c8";
-DATA: var dateTimeLibAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"_daysFromDate","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_days","type":"uint256"}],"name":"_daysToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
+DATA: var dateTimeLibAddress="0x0a91add9e3e97057980da7826043aab2a2d4c35b";
+DATA: var dateTimeLibAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMinutes","outputs":[{"name":"_minutes","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"_daysFromDate","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffHours","outputs":[{"name":"_hours","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffSeconds","outputs":[{"name":"_seconds","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_days","type":"uint256"}],"name":"_daysToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
DATA: var dateTimeLib=eth.contract(dateTimeLibAbi).at(dateTimeLibAddress);
RESULT: # Account EtherBalanceChange Token Name
RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
-RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.012024928000000000 0.000000000000000000 Account #0 - Miner
-RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.012024928000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.012635488000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.012635488000000000 0.000000000000000000 Account #1 - Contract Owner
RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Alice
RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3 - Bob
RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4 - Carol
@@ -135,7 +135,7 @@ RESULT: 8 0xa88a05d2b88283ce84c8325760b72a64591279a2 0.00000000000000000
RESULT: 9 0xa99a0ae3354c06b1459fd441a32a3f71005d7da0 0.000000000000000000 0.000000000000000000 Account #9
RESULT: 10 0xaaaa9de1e6c564446ebca0fd102d8bd92093c756 0.000000000000000000 0.000000000000000000 Account #10
RESULT: 11 0xabba43e7594e3b76afb157989e93c6621497fd4b 0.000000000000000000 0.000000000000000000 Account #11
-RESULT: 12 0xf235febef748bc1586d8aea01f093012eea7b3c8 0.000000000000000000 0.000000000000000000 DateTime Library
+RESULT: 12 0x0a91add9e3e97057980da7826043aab2a2d4c35b 0.000000000000000000 0.000000000000000000 DateTime Library
RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
RESULT: 0.000000000000000000 Total Token Balances
RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
@@ -145,7 +145,7 @@ undefined
RESULT: PASS Deploy DateTime Library
1
>
-RESULT: dateTimeLibTx status=0x1 Success gas=6000000 gasUsed=751558 costETH=0.012024928 costUSD=8.12536409888 @ ETH/USD=675.71 gasPrice=16 gwei block=25071 txIx=0 txId=0xc76da0071345cc0374d148bbc1671d1b13893be386fd35dbc40eade88c7d70e7 @ 1527224649 Fri, 25 May 2018 05:04:09 UTC
+RESULT: dateTimeLibTx status=0x1 Success gas=6000000 gasUsed=789718 costETH=0.012635488 costUSD=8.53792559648 @ ETH/USD=675.71 gasPrice=16 gwei block=271 txIx=0 txId=0x92d5d2ebe35895a20e2eda13c4e62634b25a4c118a69a7bd1fcadaceaeb61055 @ 1527269313 Fri, 25 May 2018 17:28:33 UTC
undefined
>
RESULT:
@@ -194,14 +194,14 @@ undefined
...
undefined
>
-DATA: var testDateTimeAddress="0x27daa9fe81944d721dc95e09f54c8bd3a90a5603";
-DATA: var testDateTimeAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nextYear","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"test","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
+DATA: var testDateTimeAddress="0x821ca8becdbfb00ca55e722908796a375bc2d538";
+DATA: var testDateTimeAbi=[{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"subHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMinutes","outputs":[{"name":"_minutes","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"nextYear","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"name":"timestampFromDate","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDayOfWeek","outputs":[{"name":"dayOfWeek","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffHours","outputs":[{"name":"_hours","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getHour","outputs":[{"name":"hour","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"}],"name":"_getDaysInMonth","outputs":[{"name":"daysInMonth","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"addMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekEnd","outputs":[{"name":"weekEnd","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"addYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_years","type":"uint256"}],"name":"subYears","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_hours","type":"uint256"}],"name":"addHours","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"name":"timestampFromDateTime","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffSeconds","outputs":[{"name":"_seconds","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getDay","outputs":[{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"addDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffMonths","outputs":[{"name":"_months","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"addMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getSecond","outputs":[{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"addSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getYear","outputs":[{"name":"year","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_minutes","type":"uint256"}],"name":"subMinutes","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMonth","outputs":[{"name":"month","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_months","type":"uint256"}],"name":"subMonths","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"year","type":"uint256"}],"name":"_isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isLeapYear","outputs":[{"name":"leapYear","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_days","type":"uint256"}],"name":"subDays","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffDays","outputs":[{"name":"_days","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"isWeekDay","outputs":[{"name":"weekDay","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDate","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"timestampToDateTime","outputs":[{"name":"year","type":"uint256"},{"name":"month","type":"uint256"},{"name":"day","type":"uint256"},{"name":"hour","type":"uint256"},{"name":"minute","type":"uint256"},{"name":"second","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"},{"name":"_seconds","type":"uint256"}],"name":"subSeconds","outputs":[{"name":"newTimestamp","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"test","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"timestamp","type":"uint256"}],"name":"getMinute","outputs":[{"name":"minute","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"fromTimestamp","type":"uint256"},{"name":"toTimestamp","type":"uint256"}],"name":"diffYears","outputs":[{"name":"_years","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"}];
DATA: var testDateTime=eth.contract(testDateTimeAbi).at(testDateTimeAddress);
DATA: console.log("testDateTime=" + JSON.stringify(testDateTime));
RESULT: # Account EtherBalanceChange Token Name
RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
-RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.033699968000000000 0.000000000000000000 Account #0 - Miner
-RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.033699968000000000 0.000000000000000000 Account #1 - Contract Owner
+RESULT: 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.035975008000000000 0.000000000000000000 Account #0 - Miner
+RESULT: 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.035975008000000000 0.000000000000000000 Account #1 - Contract Owner
RESULT: 2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Alice
RESULT: 3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3 - Bob
RESULT: 4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4 - Carol
@@ -212,8 +212,8 @@ RESULT: 8 0xa88a05d2b88283ce84c8325760b72a64591279a2 0.00000000000000000
RESULT: 9 0xa99a0ae3354c06b1459fd441a32a3f71005d7da0 0.000000000000000000 0.000000000000000000 Account #9
RESULT: 10 0xaaaa9de1e6c564446ebca0fd102d8bd92093c756 0.000000000000000000 0.000000000000000000 Account #10
RESULT: 11 0xabba43e7594e3b76afb157989e93c6621497fd4b 0.000000000000000000 0.000000000000000000 Account #11
-RESULT: 12 0xf235febef748bc1586d8aea01f093012eea7b3c8 0.000000000000000000 0.000000000000000000 DateTime Library
-RESULT: 13 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 TestDateTime
+RESULT: 12 0x0a91add9e3e97057980da7826043aab2a2d4c35b 0.000000000000000000 0.000000000000000000 DateTime Library
+RESULT: 13 0x821ca8becdbfb00ca55e722908796a375bc2d538 0.000000000000000000 0.000000000000000000 TestDateTime
RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
RESULT: 0.000000000000000000 Total Token Balances
RESULT: -- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
@@ -223,7 +223,7 @@ undefined
RESULT: PASS Deploy TestDateTime Contract
1
>
-RESULT: testDateTimeAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 status=0x1 Success gas=6000000 gasUsed=1354690 costETH=0.02167504 costUSD=14.6460412784 @ ETH/USD=675.71 gasPrice=16 gwei block=25073 txIx=0 txId=0x4a1b70c5255f3f89d46667e6cc9ad87a87ea1f5585ffe0d8a5430a960d9000c8 @ 1527224651 Fri, 25 May 2018 05:04:11 UTC
+RESULT: testDateTimeAddress=0x821ca8becdbfb00ca55e722908796a375bc2d538 status=0x1 Success gas=6000000 gasUsed=1458720 costETH=0.02333952 costUSD=15.7707470592 @ ETH/USD=675.71 gasPrice=16 gwei block=273 txIx=0 txId=0x79c7c0cdf772e9817af825e325739a73151b03671dd4a57f4d30446cd46f89cf @ 1527269315 Fri, 25 May 2018 17:28:35 UTC
undefined
>
RESULT:
@@ -661,6 +661,17 @@ undefined
...
...
...
+...
+...
+......
+......
+...
+......
+......
+...
+......
+......
+...
......
......
...
@@ -671,10 +682,15 @@ undefined
......
...
...
-RESULT: ---------- Test diff{Days|Months|Years} ----------
-RESULT: PASS 2017,10,21,1,2,3 to 2017,10,21,1,2,3 has 635 days diff
-RESULT: PASS 2017,10,21,1,2,3 to 2017,10,21,1,2,3 has 21 months diff
-RESULT: PASS 2017,10,21,1,2,3 to 2017,10,21,1,2,3 has 2 years diff
+RESULT: ---------- Test diff{Years|Months|Days|Hours|Minutes|Seconds} ----------
+RESULT: fromTimestamp=1508547723 2017,10,21,1,2,3
+RESULT: toTimestamp=1563422706 2019,7,18,4,5,6
+RESULT: PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 2 years diff
+RESULT: PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 21 months diff
+RESULT: PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 635 days diff
+RESULT: PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 15,243 hours diff
+RESULT: PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 914,583 minutes diff
+RESULT: PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 54,874,983 seconds diff
RESULT:
undefined
>
diff --git a/test/test1results.txt b/test/test1results.txt
index f76eac6..eb6f94b 100644
--- a/test/test1results.txt
+++ b/test/test1results.txt
@@ -20,8 +20,8 @@
----- Deploy DateTime Library -----
# Account EtherBalanceChange Token Name
-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
- 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.012024928000000000 0.000000000000000000 Account #0 - Miner
- 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.012024928000000000 0.000000000000000000 Account #1 - Contract Owner
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.012635488000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.012635488000000000 0.000000000000000000 Account #1 - Contract Owner
2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Alice
3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3 - Bob
4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4 - Carol
@@ -32,19 +32,19 @@
9 0xa99a0ae3354c06b1459fd441a32a3f71005d7da0 0.000000000000000000 0.000000000000000000 Account #9
10 0xaaaa9de1e6c564446ebca0fd102d8bd92093c756 0.000000000000000000 0.000000000000000000 Account #10
11 0xabba43e7594e3b76afb157989e93c6621497fd4b 0.000000000000000000 0.000000000000000000 Account #11
-12 0xf235febef748bc1586d8aea01f093012eea7b3c8 0.000000000000000000 0.000000000000000000 DateTime Library
+12 0x0a91add9e3e97057980da7826043aab2a2d4c35b 0.000000000000000000 0.000000000000000000 DateTime Library
-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
0.000000000000000000 Total Token Balances
-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
PASS Deploy DateTime Library
-dateTimeLibTx status=0x1 Success gas=6000000 gasUsed=751558 costETH=0.012024928 costUSD=8.12536409888 @ ETH/USD=675.71 gasPrice=16 gwei block=25071 txIx=0 txId=0xc76da0071345cc0374d148bbc1671d1b13893be386fd35dbc40eade88c7d70e7 @ 1527224649 Fri, 25 May 2018 05:04:09 UTC
+dateTimeLibTx status=0x1 Success gas=6000000 gasUsed=789718 costETH=0.012635488 costUSD=8.53792559648 @ ETH/USD=675.71 gasPrice=16 gwei block=271 txIx=0 txId=0x92d5d2ebe35895a20e2eda13c4e62634b25a4c118a69a7bd1fcadaceaeb61055 @ 1527269313 Fri, 25 May 2018 17:28:33 UTC
---------- Deploy TestDateTime Contract ----------
# Account EtherBalanceChange Token Name
-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
- 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.033699968000000000 0.000000000000000000 Account #0 - Miner
- 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.033699968000000000 0.000000000000000000 Account #1 - Contract Owner
+ 0 0xa00af22d07c87d96eeeb0ed583f8f6ac7812827e 0.035975008000000000 0.000000000000000000 Account #0 - Miner
+ 1 0xa11aae29840fbb5c86e6fd4cf809eba183aef433 -0.035975008000000000 0.000000000000000000 Account #1 - Contract Owner
2 0xa22ab8a9d641ce77e06d98b7d7065d324d3d6976 0.000000000000000000 0.000000000000000000 Account #2 - Alice
3 0xa33a6c312d9ad0e0f2e95541beed0cc081621fd0 0.000000000000000000 0.000000000000000000 Account #3 - Bob
4 0xa44a08d3f6933c69212114bb66e2df1813651844 0.000000000000000000 0.000000000000000000 Account #4 - Carol
@@ -55,14 +55,14 @@ dateTimeLibTx status=0x1 Success gas=6000000 gasUsed=751558 costETH=0.012024928
9 0xa99a0ae3354c06b1459fd441a32a3f71005d7da0 0.000000000000000000 0.000000000000000000 Account #9
10 0xaaaa9de1e6c564446ebca0fd102d8bd92093c756 0.000000000000000000 0.000000000000000000 Account #10
11 0xabba43e7594e3b76afb157989e93c6621497fd4b 0.000000000000000000 0.000000000000000000 Account #11
-12 0xf235febef748bc1586d8aea01f093012eea7b3c8 0.000000000000000000 0.000000000000000000 DateTime Library
-13 0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 0.000000000000000000 0.000000000000000000 TestDateTime
+12 0x0a91add9e3e97057980da7826043aab2a2d4c35b 0.000000000000000000 0.000000000000000000 DateTime Library
+13 0x821ca8becdbfb00ca55e722908796a375bc2d538 0.000000000000000000 0.000000000000000000 TestDateTime
-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
0.000000000000000000 Total Token Balances
-- ------------------------------------------ --------------------------- ------------------------------ ---------------------------
PASS Deploy TestDateTime Contract
-testDateTimeAddress=0x27daa9fe81944d721dc95e09f54c8bd3a90a5603 status=0x1 Success gas=6000000 gasUsed=1354690 costETH=0.02167504 costUSD=14.6460412784 @ ETH/USD=675.71 gasPrice=16 gwei block=25073 txIx=0 txId=0x4a1b70c5255f3f89d46667e6cc9ad87a87ea1f5585ffe0d8a5430a960d9000c8 @ 1527224651 Fri, 25 May 2018 05:04:11 UTC
+testDateTimeAddress=0x821ca8becdbfb00ca55e722908796a375bc2d538 status=0x1 Success gas=6000000 gasUsed=1458720 costETH=0.02333952 costUSD=15.7707470592 @ ETH/USD=675.71 gasPrice=16 gwei block=273 txIx=0 txId=0x79c7c0cdf772e9817af825e325739a73151b03671dd4a57f4d30446cd46f89cf @ 1527269315 Fri, 25 May 2018 17:28:35 UTC
---------- Test isLeapYear ----------
PASS 2000,5,24,1,2,3 is a leap year
@@ -148,10 +148,15 @@ PASS 2015,7,15,1,2,3 - 223,776 hours is 1990/01/03 01:02:03
PASS 2018,3,1,2,3,4 - 21,600,000 minutes is 1977/02/04 02:03:04
PASS 2020,3,19,3,4,5 - 788,227,200 seconds is 1995/03/28 03:04:05
----------- Test diff{Days|Months|Years} ----------
-PASS 2017,10,21,1,2,3 to 2017,10,21,1,2,3 has 635 days diff
-PASS 2017,10,21,1,2,3 to 2017,10,21,1,2,3 has 21 months diff
-PASS 2017,10,21,1,2,3 to 2017,10,21,1,2,3 has 2 years diff
+---------- Test diff{Years|Months|Days|Hours|Minutes|Seconds} ----------
+fromTimestamp=1508547723 2017,10,21,1,2,3
+toTimestamp=1563422706 2019,7,18,4,5,6
+PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 2 years diff
+PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 21 months diff
+PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 635 days diff
+PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 15,243 hours diff
+PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 914,583 minutes diff
+PASS 2017,10,21,1,2,3 to 2019,7,18,4,5,6 has 54,874,983 seconds diff
---------- Test timestampToDateTime(...) and timestampFromDateTime(...) against JavaScript Date ----------
timestampToDateTime(48611)=["1970","1","1","13","30","11"]