package
0.0.0-20241113112105-d5176070b8d9
Repository: https://github.com/ortizdavid/go-nopain.git
Documentation: pkg.go.dev

# README

datetime

Package for handling and manipulating dates and times with ease. It provides utilities for date and time conversion, as well as performing operations such as adding or subtracting days, weeks, months, and years, calculating time differences, and formatting human-readable time ago strings.

Features

  • Date and Time Conversion:

    • Convert between time.Time and string representations.
    • Support for YYYY-MM-DD and YYYY-MM-DD HH:MM:SS formats.
  • Date Operations:

    • Add or subtract days, weeks, months, or years from a given date.
    • Calculate the difference between two dates.
  • Age Calculation:

    • Calculate the age based on a given birthdate.
  • Time Ago Functionality:

    • Return a human-readable string indicating how much time has passed since a given date or between two dates.