Closed IscoRuta98 closed 1 year ago
Name | Link |
---|---|
Latest commit | 47c7c50fe5afa742635519710cfc7c8a165306d8 |
Latest deploy log | https://app.netlify.com/sites/nautilus-wallet-staging/deploys/64a402fee978ea00089737ec |
Deploy Preview | https://deploy-preview-598--nautilus-wallet-staging.netlify.app/ |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Nice, just a few minor feedback:
console.log
that's not in error blocks?One more fix:
You'll need to use the following typescript function to convert a Date object to their ordinal value:
const _DAYS_IN_MONTH: number[] = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function isLeapYear(year: number): boolean {
// year -> 1 if leap year, else 0.
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function getDateToOrdinal(date: Date): number {
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
return (
(year - 1) * 365 +
Math.floor((year - 1) / 4) -
Math.floor((year - 1) / 100) +
Math.floor((year - 1) / 400) +
_DAYS_IN_MONTH.slice(1, month).reduce((acc, curr) => acc + curr, 0) +
(month > 2 && isLeapYear(year) ? 1 : 0) +
day
);
}
Implementation of Frontend Recurring Payment feature.