Skip to content

VictorKreniski/UtilityTools

Repository files navigation

UtilityTools

UtilityTools is a Swift Package Manager (SPM) package that provides day-to-day extensions and convenient code snippets to accelerate your development process. Initially focused on date-related utilities, the package is designed to expand and incorporate more tools over time.

Installation

Swift Package Manager

To integrate this library into your Xcode project using Swift Package Manager, follow these steps:

  1. Open your Xcode project.
  2. Navigate to the menu File > Swift Packages > Add Package Dependency....
  3. Enter the following URL of this repository: git@github.com:VictorKreniski/UtilityTools.git.
  4. Click Next and select the version or branch you want to use.
  5. Click Next and then Finish.

The library will be automatically resolved and linked with your Xcode project.

Usage

Once you've added the package to your project, you can start using the networking capabilities.

Import the Library

In the Swift file where you want to use the networking library, import it at the top:

import UtilityTools

Features

Date Extensions

Combine Date and Time

let combinedDate = someDate.combineDate(time: someTime)

Create All Month Days

let allMonthDays = someDate.createAllMonthDays()

End of Day

let endOfDay = someDate.endOfDay()

Generate Week Dates

if let weeklyDates = someDate.generateWeekDates(since: startOfWeekDate) {
    // Use weeklyDates array
}

Check if Date is Today or in the Past/Future

let isToday = someDate.isToday()
let isAtLeastToday = someDate.isAtLeastToday()
let isBiggerThanToday = someDate.isBiggerThanToday()

Start of Day and Start of Week

let startOfDay = someDate.startOfDay()
let startOfWeek = someDate.startOfWeek()

Contribution

Contributions to UtilityTools are welcome! If you have additional extensions or features that could benefit the community, feel free to open a pull request.

License

UtilityTools is released under the MIT License.


Feel free to modify any other sections or add more details based on your project's requirements.

About

Day to Day - Helper code to speed up consulting

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages