Rename type definition files. Update documentation. Update date-fn functions being used.

This commit is contained in:
Lucid Kobold
2022-06-14 17:38:40 -05:00
parent 632674c898
commit dff09977f9
8 changed files with 37 additions and 29 deletions

View File

@@ -1,11 +1,9 @@
import {
getDate,
endOfMonth,
sub,
format,
startOfMonth,
set,
add,
isAfter,
isBefore,
subMonths,
@@ -73,7 +71,7 @@ const isOverflow = (
* @returns The month layout object for the provided month.
*/
const populateMonth = (selectedDate: Date): MonthLayout => {
const endLastMonth = getDate(endOfMonth(sub(selectedDate, { months: 1 })));
const endLastMonth = getDate(endOfMonth(subMonths(selectedDate, 1)));
const startOfSelectedMonth = format(startOfMonth(selectedDate), "iii");
const ISOToIndex = {