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

merge time_ago & remaining_time to new time_diff module #53

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

thevilx
Copy link
Contributor

@thevilx thevilx commented Feb 4, 2024

Merged time_ago and remaining_time modules to introduce a consolidated and more versatile module named time_diff.

time_diff() returns TimeDiff struct:

pub struct TimeDiff {
    pub years: u32,
    pub months: u8,
    pub days: u8,
    pub hours: u8,
    pub minutes: u8,
    pub seconds: u8,
    pub is_remaining_time: bool,
}

The TimeDiff struct now features two distinct methods:

  • short_form: Resembling the behavior of the original time_ago module.
  • long_form: Emulating the functionality of the former remaining_time module.

@ali77gh ali77gh merged commit 4a5519f into persian-tools:dev Feb 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants