Skip to content
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

🚀 - New maskitoParseDate / maskitoStringifyDate helpers #1893

Open
jeffrey-planon opened this issue Dec 12, 2024 · 1 comment
Open

🚀 - New maskitoParseDate / maskitoStringifyDate helpers #1893

jeffrey-planon opened this issue Dec 12, 2024 · 1 comment
Labels
contributions welcome Architecture is clear and community can help feature New feature or request P3 This issue has low priority scope: kit Related to @maskito/kit

Comments

@jeffrey-planon
Copy link

Which package(s) are relevant/related to the feature request?

No response

Description

I'd like to parse a date string to a Date. These functions would be helpful.

Any reason why they are not exported?

@jeffrey-planon jeffrey-planon added the feature New feature or request label Dec 12, 2024
@nsbarsukov
Copy link
Member

nsbarsukov commented Dec 13, 2024

@jeffrey-planon Hello!

Maskito contains a lot of internal (not public API!) utility.
We don't expose them on purpose – we are not ready to promise backward compatibility for them (our experience shows that their function signatures can be changed in any release even for any small bugs).
So, we don't have plans to move parseDateString and segmentsToDate to public API.

However, we already had plans to create public utilities similar already existing maskitoParseTime / maskitoStringifyTime.

import {maskitoParseDate, maskitoStringifyDate, MaskitoDateParams} from '@maskito/kit';

export function maskitoDateOptionsGenerator(params: MaskitoDateParams): MaskitoOptions;

export function maskitoParseDate(value: string, params: MaskitoDateParams): Date;
export function maskitoStringifyDate(date: Date, params: MaskitoDateParams): string; 

Let's this issue will be devote to these functions.

@nsbarsukov nsbarsukov changed the title 🚀 - Export functions parseDateString and segmentsToDate 🚀 - New maskitoParseDate / maskitoStringifyDate helpers Dec 13, 2024
@nsbarsukov nsbarsukov added P3 This issue has low priority scope: kit Related to @maskito/kit contributions welcome Architecture is clear and community can help labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome Architecture is clear and community can help feature New feature or request P3 This issue has low priority scope: kit Related to @maskito/kit
Projects
None yet
Development

No branches or pull requests

2 participants