diff --git a/README.md b/README.md index db31fba..fd46c91 100644 --- a/README.md +++ b/README.md @@ -42,23 +42,31 @@ Refer to the documenation for examples on how to use table-sort-js with [HTML](h #### Classes: -| <table> classes | Description | -| --------------------- | -------------------------------------------------------------------------------------------- | -| "table-sort" | Make the table sortable! (Words, numbers)... | -| "table-arrows" | Display ascending or descending triangles. | -| "no-class-infer" | Turns off inference for adding sort classes automatically (file-size-sort and runtime-sort). | -| "remember-sort" | If clicking on different columns remembers sort of the original column. | +| <table> classes | Description | +| --------------------- | ------------------------------------------------------------------------------------------------------------- | +| "table-sort" | Make the table sortable! (Words, numbers, dates, file sizes)... | +| "table-arrows" | Display ascending or descending triangles. | +| "no-class-infer" | Turns off inference for adding sort classes automatically i.e (file-size-sort, runtime-sort, dates-dmy-sort). | +| "remember-sort" | If clicking on different columns remembers sort of the original column. | | <th> classes | Description | | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | -| "order-by-desc" | Order by descending on first click. (default is aescending) | | "data-sort" | Sort by [data attributes](https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes), e.g <td data-sort="42"> | | "onload-sort" | Sort column on loading of the page. Simulates a click from the user. (can only sort onload for one column) | -| "file-size-sort" | Sort file sizes(B->TiB) uses the binary prefix. (e.g KiB) | -| "runtime-sort" | Sorts runtime in minutes and seconds e.g (1m 20s). Useful for sorting the GitHub actions Run time column... | | "disable-sort" | Disallow sorting the table by this specific column. | -| "alpha-sort" | Sort alphabetically (z11,z2); default is [natural sort](https://en.wikipedia.org/wiki/Natural_sort_order) (z2,z11). | -| "punct-sort" | Sort punctuation; default ignores punctuation. | +| "dates-mdy-sort" | Sorts dates in mm/dd/yyyy format. e.g (12/28/2023). Can use "/" or "-" or "." as separator. Overides inferred "dates-dmy-sort" class. | + +| <th> Inferred Classes. | Description | +| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| "dates-dmy-sort" | Sorts dates in dd/mm/yyyy format. e.g (18/10/1995). Can use "/" or "-" or "." as separator. | +| "runtime-sort" | Sorts runtime in hours minutes and seconds e.g (10h 1m 20s). Useful for sorting the GitHub actions Run time column... | +| "file-size-sort" | Sorts file sizes(B->TiB) uses the binary prefix. (e.g KiB). Input data ideally in Bytes e.g (10b or 10B) | + +| <th> Classes that change defaults. | Description | +| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| "order-by-desc" | Order by descending on first click. (default is aescending) | +| "alpha-sort" | Sort alphabetically (z11,z2); default is [natural sort](https://en.wikipedia.org/wiki/Natural_sort_order) (z2,z11). | +| "punct-sort" | Sort punctuation; default ignores punctuation. | #### Development: diff --git a/deploy.sh b/deploy.sh index 993416c..b97ce39 100755 --- a/deploy.sh +++ b/deploy.sh @@ -6,4 +6,5 @@ cp Contributors.md npm/Contributors.md npx prettier --write . npm run deploy npm run test -echo "Reminder: Update npm package to new version in npm/package.json and npm publish" +echo "Reminder: Update npm package to new version in npm/package.json and npm publish." +echo "Reminder: Update firefox browser extension manifest." diff --git a/public/index.html b/public/index.html index c8a46e5..b8660ab 100644 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,7 @@
-Department | Runtime | File Size | +dates in dd/mm/yyyy | ||||||
---|---|---|---|---|---|---|---|---|---|
Franklin | -benjamin | +Benjamin | 1706,1,17 | -+ | 1 | k-level | 1h 1m 17s | 10b | +17/6/1978 |
da Vinci | Zarlo | 1452.4.15 | -+ | 13000 | 1m 45s | 192038998987021b | +18/10/2027 | ||
Statham | -+ | Jason | 1967-7-26 | HR | 11m 40s | 134809b | +4/9/2008 | ||
Micheal | -+ | Angelo | 1958/8/21 | 54 | Marketing | 29s | 30980980b | +2/3/1879 | |
Marketing | 41s | 902938402398b | +8/6/1978 |