[+] Add toString to Date
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
4F98955225A9260400F51321 /* Net.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F98955125A9260400F51321 /* Net.swift */; };
|
4F98955225A9260400F51321 /* Net.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F98955125A9260400F51321 /* Net.swift */; };
|
||||||
4FA419AF25AF93EC004CE0FC /* AlarmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FA419AE25AF93EC004CE0FC /* AlarmViewController.swift */; };
|
4FA419AF25AF93EC004CE0FC /* AlarmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FA419AE25AF93EC004CE0FC /* AlarmViewController.swift */; };
|
||||||
4FD642D325B48C380069171E /* AlarmActivator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD642D225B48C380069171E /* AlarmActivator.swift */; };
|
4FD642D325B48C380069171E /* AlarmActivator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD642D225B48C380069171E /* AlarmActivator.swift */; };
|
||||||
|
4FD642DB25B4B7F60069171E /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD642DA25B4B7F60069171E /* Utils.swift */; };
|
||||||
4FF0683F25A5F18700304E6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0683E25A5F18700304E6B /* AppDelegate.swift */; };
|
4FF0683F25A5F18700304E6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0683E25A5F18700304E6B /* AppDelegate.swift */; };
|
||||||
4FF0684125A5F18700304E6B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0684025A5F18700304E6B /* SceneDelegate.swift */; };
|
4FF0684125A5F18700304E6B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0684025A5F18700304E6B /* SceneDelegate.swift */; };
|
||||||
4FF0684325A5F18700304E6B /* AccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0684225A5F18700304E6B /* AccountViewController.swift */; };
|
4FF0684325A5F18700304E6B /* AccountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FF0684225A5F18700304E6B /* AccountViewController.swift */; };
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
4F98955125A9260400F51321 /* Net.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Net.swift; sourceTree = "<group>"; };
|
4F98955125A9260400F51321 /* Net.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Net.swift; sourceTree = "<group>"; };
|
||||||
4FA419AE25AF93EC004CE0FC /* AlarmViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmViewController.swift; sourceTree = "<group>"; };
|
4FA419AE25AF93EC004CE0FC /* AlarmViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmViewController.swift; sourceTree = "<group>"; };
|
||||||
4FD642D225B48C380069171E /* AlarmActivator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmActivator.swift; sourceTree = "<group>"; };
|
4FD642D225B48C380069171E /* AlarmActivator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlarmActivator.swift; sourceTree = "<group>"; };
|
||||||
|
4FD642DA25B4B7F60069171E /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
|
||||||
4FF0683B25A5F18700304E6B /* ProjectClock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectClock.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
4FF0683B25A5F18700304E6B /* ProjectClock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectClock.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
4FF0683E25A5F18700304E6B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
4FF0683E25A5F18700304E6B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
4FF0684025A5F18700304E6B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
|
4FF0684025A5F18700304E6B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
|
||||||
@@ -91,6 +93,7 @@
|
|||||||
4F509BD125AE22D100726227 /* Models.swift */,
|
4F509BD125AE22D100726227 /* Models.swift */,
|
||||||
7C83963825AF68980027A94C /* TestingViewController.swift */,
|
7C83963825AF68980027A94C /* TestingViewController.swift */,
|
||||||
4FD642D225B48C380069171E /* AlarmActivator.swift */,
|
4FD642D225B48C380069171E /* AlarmActivator.swift */,
|
||||||
|
4FD642DA25B4B7F60069171E /* Utils.swift */,
|
||||||
);
|
);
|
||||||
path = ProjectClock;
|
path = ProjectClock;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -184,6 +187,7 @@
|
|||||||
4FF0683F25A5F18700304E6B /* AppDelegate.swift in Sources */,
|
4FF0683F25A5F18700304E6B /* AppDelegate.swift in Sources */,
|
||||||
4FD642D325B48C380069171E /* AlarmActivator.swift in Sources */,
|
4FD642D325B48C380069171E /* AlarmActivator.swift in Sources */,
|
||||||
4FF0684125A5F18700304E6B /* SceneDelegate.swift in Sources */,
|
4FF0684125A5F18700304E6B /* SceneDelegate.swift in Sources */,
|
||||||
|
4FD642DB25B4B7F60069171E /* Utils.swift in Sources */,
|
||||||
4FA419AF25AF93EC004CE0FC /* AlarmViewController.swift in Sources */,
|
4FA419AF25AF93EC004CE0FC /* AlarmViewController.swift in Sources */,
|
||||||
4F509BD225AE22D100726227 /* Models.swift in Sources */,
|
4F509BD225AE22D100726227 /* Models.swift in Sources */,
|
||||||
7C83963625AF375B0027A94C /* NotificationLogic.swift in Sources */,
|
7C83963625AF375B0027A94C /* NotificationLogic.swift in Sources */,
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// Utils.swift
|
||||||
|
// ProjectClock
|
||||||
|
//
|
||||||
|
// Created by Hykilpikonna on 1/17/21.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension Date
|
||||||
|
{
|
||||||
|
/// Add toString to Date
|
||||||
|
func str() -> String
|
||||||
|
{
|
||||||
|
let f = DateFormatter()
|
||||||
|
f.dateFormat = "yyyy-MM-dd hh:mm:ss"
|
||||||
|
return f.string(from: self)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user