Skip to content

Commit

Permalink
Fixed dateWith() issue with day.
Browse files Browse the repository at this point in the history
  • Loading branch information
melvitax committed Feb 28, 2017
1 parent 1088364 commit c5e5dc0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AFDateHelper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "AFDateHelper"
s.version = "4.0.0"
s.version = "4.0.1"
s.summary = "Date Extension for Swift 3.0"
s.description = <<-DESC
A Swift Date extension for creating, modifying and comparing dates.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Swift 3
## Installation

**Carthage** github "melvitax/DateHelper"
**Cocoapods** pod 'AFDateHelper', '~> 4.0'
**Cocoapods** pod 'AFDateHelper', '~> 4.0.1'
**Manually** Include DateHelper.swift in your project

## Usage
Expand Down
6 changes: 3 additions & 3 deletions Sources/DateHelper.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// AFDateHelper.swift
//
// Version 4.0.0
// https://github.com/melvitax/DateHelper
// Version 4.0.1
//
// Created by Melvin Rivera on 7/15/14.
// Copyright (c) 2014. All rights reserved.
Expand Down Expand Up @@ -373,7 +373,7 @@ public extension Date {
func dateWith(hour: Int?, minute: Int?, second: Int?, day: Int? = nil, month: Int? = nil) -> Date {
var comp = Date.components(self)
comp.month = month ?? comp.month
comp.day = day ?? comp.weekday
comp.day = day ?? comp.day
comp.hour = hour ?? comp.hour
comp.minute = minute ?? comp.minute
comp.second = second ?? comp.second
Expand Down
Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified logo.sketch
Binary file not shown.

0 comments on commit c5e5dc0

Please sign in to comment.