-
Notifications
You must be signed in to change notification settings - Fork 12
feat: fix some Readmes #677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@flatfile/plugin-validate-number': patch | ||
| '@flatfile/plugin-validate-date': patch | ||
| --- | ||
|
|
||
| Update READMEs |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,9 @@ The `outputFormat` parameter specifies the desired output format for the normali | |
| #### `config.includeTime` - `boolean` | ||
| The `includeTime` parameter determines whether to include time in the normalized output. | ||
|
|
||
| #### `config.locale` - `string` - (optional) | ||
| The `locale` parameter specifies the locale to use for date parsing. Currently, only 'en-US' is supported. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash install | ||
|
|
@@ -45,12 +48,16 @@ export default function (listener: FlatfileListener) { | |
| listener.use( | ||
| validateDate({ | ||
| sheetSlug: 'contacts', | ||
| dateFields: ['birthdate', 'registration_date'], | ||
| outputFormat: 'MM/DD/YYYY', | ||
| dateFields: ['birth_date', 'registration_date'], | ||
| outputFormat: 'MM/dd/yyyy', | ||
| includeTime: false | ||
| }) | ||
| ) | ||
|
|
||
| // ... rest of your Flatfile listener configuration | ||
| } | ||
| ``` | ||
|
|
||
| ## Notes | ||
|
|
||
| - The plugin uses the `chrono-node` library for parsing dates, which supports a wide range of date formats. | ||
| - If a date cannot be parsed, the plugin will add an error message to the record for that field. | ||
| - The `locale` parameter is included in the configuration interface but is not currently used in the implementation. The plugin defaults to using the 'en-US' locale. | ||
|
Comment on lines
+59
to
+63
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address inconsistency with 'locale' parameter The new "Notes" section provides valuable context about the plugin's functionality. However, there's an inconsistency regarding the 'locale' parameter:
This inconsistency may confuse users. Consider the following options:
Please review the implementation to determine the correct approach. 🧰 Tools🪛 LanguageTool
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update example description to match the code.
The example description still references "birthdate" while the code uses "birth_date". Please update the description to maintain consistency.