ADded daily states
This commit is contained in:
@@ -1,117 +0,0 @@
|
|||||||
////
|
|
||||||
//// StatsAPIController.swift
|
|
||||||
//// App
|
|
||||||
////
|
|
||||||
//// Created by Michael Simard on 5/29/20.
|
|
||||||
////
|
|
||||||
//
|
|
||||||
//import Fluent
|
|
||||||
//import Vapor
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//protocol ContentController {
|
|
||||||
// associatedtype Model: Fluent.Model
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//protocol StatsContentRepresentable {
|
|
||||||
// associatedtype StatsItem: Content
|
|
||||||
// var statsContent : StatsItem { get }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//protocol StatsContentController: ContentController where Model: StatsContentRepresentable {
|
|
||||||
//
|
|
||||||
// func stats (_:Request) throws -> EventLoopFuture<Page<Model.StatsItem>>
|
|
||||||
// func setupStatsRoute( routes: RoutesBuilder)
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//extension StatsContentController {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// func stats (req:Request) throws -> EventLoopFuture<Page<Model.StatsItem>> {
|
|
||||||
// return Model.query(on: req.db).paginate(for: req).map { $0.map(\.statsContent)}
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func setupStatsRoute( routes: RoutesBuilder)
|
|
||||||
// {
|
|
||||||
// routes.get(use: self.stats)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
////***********
|
|
||||||
//
|
|
||||||
//final class StatsModel: Model, Content {
|
|
||||||
// typealias IDValue = <#type#>
|
|
||||||
//
|
|
||||||
// static var schema: String
|
|
||||||
//
|
|
||||||
// init() {
|
|
||||||
// <#code#>
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// var winLoss:String
|
|
||||||
// var totalWins:Int
|
|
||||||
// var totalLosses:Int
|
|
||||||
// init( winLoss:String, totalWins:Int, totalLosses:Int) {
|
|
||||||
//
|
|
||||||
// self.winLoss = winLoss
|
|
||||||
// self.totalWins = totalWins
|
|
||||||
// self.totalLosses = totalLosses
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//extension StatsModel: StatsContentRepresentable {
|
|
||||||
//
|
|
||||||
// struct StatsItem: Content {
|
|
||||||
//
|
|
||||||
// var winLoss:String
|
|
||||||
// var totalWins:Int
|
|
||||||
// var totalLosses:Int
|
|
||||||
//
|
|
||||||
// init(model:StatsModel) {
|
|
||||||
//
|
|
||||||
// self.winLoss = model.winLoss
|
|
||||||
// self.totalWins = model.totalWins
|
|
||||||
// self.totalLosses = model.totalLosses
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// var statsContent: StatsItem { .init(model:self) }
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//
|
|
||||||
////***********
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//struct StatsAPIController: StatsContentController {
|
|
||||||
//
|
|
||||||
// typealias Model = StatsModel
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//struct StatsRouter: RouteCollection {
|
|
||||||
//
|
|
||||||
// func boot(routes: RoutesBuilder) throws {
|
|
||||||
// let statsRoute = routes.grouped("api", "stats")
|
|
||||||
//
|
|
||||||
// StatsAPIController().setupStatsRoute(routes: statsRoute)
|
|
||||||
//
|
|
||||||
//// statsRoute.get("allMatches", use: index)
|
|
||||||
//// statsRoute.get("totalWins", use: totalWins)
|
|
||||||
//// statsRoute.get("totalLosses", use: totalLosses)
|
|
||||||
// //statsRoute.get("overall", use: totalLosses)
|
|
||||||
//
|
|
||||||
// //beaconsRoute.get("overallStats", use: index)
|
|
||||||
// //beaconsRoute.post("", use: create)
|
|
||||||
// // beaconsRoute.delete(":beaconID", use: delete)
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
@@ -3,6 +3,11 @@ import Vapor
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct CODDate {
|
||||||
|
let month:Int
|
||||||
|
let year:Int
|
||||||
|
let day: Int
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct StatsController: RouteCollection {
|
struct StatsController: RouteCollection {
|
||||||
@@ -13,17 +18,13 @@ struct StatsController: RouteCollection {
|
|||||||
statsRoute.get("totalWins", use: totalWins)
|
statsRoute.get("totalWins", use: totalWins)
|
||||||
statsRoute.get("totalLosses", use: totalLosses)
|
statsRoute.get("totalLosses", use: totalLosses)
|
||||||
statsRoute.get("overall", use: overall)
|
statsRoute.get("overall", use: overall)
|
||||||
statsRoute.get("march", use: getMarchStats)
|
|
||||||
statsRoute.get("all", use: all)
|
statsRoute.get("all", use: all)
|
||||||
|
statsRoute.get("allDaily", use: allDaily)
|
||||||
//beaconsRoute.get("overallStats", use: index)
|
|
||||||
//beaconsRoute.post("", use: create)
|
|
||||||
// beaconsRoute.delete(":beaconID", use: delete)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func index(req: Request) throws -> EventLoopFuture<[Match]> {
|
func index(req: Request) throws -> EventLoopFuture<[Match]> {
|
||||||
return Match.query(on: req.db).all()
|
return Match.query(on: req.db).sort(\.$date).all()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -40,10 +41,10 @@ struct StatsController: RouteCollection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getMarchStats(req:Request) throws -> EventLoopFuture<Stats> {
|
func getMarchStats(req:Request) throws -> EventLoopFuture<Stats> {
|
||||||
return getStatsByMonth(year: 2020, month: 03, req: req)
|
return getstatsForMonth(year: 2020, month: 03, req: req)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getStatsByMonth(year:Int, month:Int, req: Request) -> EventLoopFuture<Stats>{
|
func getstatsForMonth(year:Int, month:Int, req: Request) -> EventLoopFuture<Stats>{
|
||||||
|
|
||||||
let winCount = Match.query(on: req.db)
|
let winCount = Match.query(on: req.db)
|
||||||
.filter(\.$date >= getStartOfMonth(month: month, year: year))
|
.filter(\.$date >= getStartOfMonth(month: month, year: year))
|
||||||
@@ -66,6 +67,34 @@ struct StatsController: RouteCollection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getStatsForDay(year:Int, month:Int, day:Int, req: Request) -> EventLoopFuture<Stats>{
|
||||||
|
|
||||||
|
|
||||||
|
let winCount = Match.query(on: req.db)
|
||||||
|
.filter(\.$date >= getStartOfDay(day:day, month: month, year: year))
|
||||||
|
.filter(\.$date <= getEndOfDay(day: day, month: month, year: year))
|
||||||
|
.filter(\.$win == true )
|
||||||
|
.count()
|
||||||
|
|
||||||
|
|
||||||
|
let lossCount = Match.query(on: req.db)
|
||||||
|
.filter(\.$date >= getStartOfDay(day:day, month: month, year: year))
|
||||||
|
.filter(\.$date <= getEndOfDay(day: day, month: month, year: year))
|
||||||
|
.filter(\.$win == false )
|
||||||
|
.count()
|
||||||
|
|
||||||
|
let combined = winCount.and(lossCount)
|
||||||
|
|
||||||
|
return combined.map { (winCount, lossCount) -> (Stats) in
|
||||||
|
|
||||||
|
let ratio:Double = (Double(winCount) / Double(lossCount)).truncate(places: 2)
|
||||||
|
return Stats.init(winLoss: String(ratio), totalWins: winCount, totalLosses: lossCount)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func statsForRecent(numberGames:Int, req:Request) -> EventLoopFuture<Stats> {
|
func statsForRecent(numberGames:Int, req:Request) -> EventLoopFuture<Stats> {
|
||||||
|
|
||||||
let winCount = Match.query(on: req.db)
|
let winCount = Match.query(on: req.db)
|
||||||
@@ -93,62 +122,49 @@ struct StatsController: RouteCollection {
|
|||||||
|
|
||||||
|
|
||||||
private func getStartOfMonth(month:Int, year:Int) -> Date {
|
private func getStartOfMonth(month:Int, year:Int) -> Date {
|
||||||
|
|
||||||
let calendar = Calendar.current
|
let calendar = Calendar.current
|
||||||
|
|
||||||
var components = DateComponents()
|
var components = DateComponents()
|
||||||
|
|
||||||
components.day = 1
|
components.day = 1
|
||||||
components.month = month
|
components.month = month
|
||||||
components.year = year
|
components.year = year
|
||||||
components.hour = 0
|
components.hour = 0
|
||||||
components.minute = 0
|
components.minute = 0
|
||||||
|
|
||||||
return calendar.date(from: components)!
|
return calendar.date(from: components)!
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func getEndOfMonth(month:Int, year:Int) -> Date {
|
private func getEndOfMonth(month:Int, year:Int) -> Date {
|
||||||
let calendar = Calendar.current
|
let calendar = Calendar.current
|
||||||
|
|
||||||
var components = DateComponents()
|
var components = DateComponents()
|
||||||
|
|
||||||
components.day = -1
|
components.day = -1
|
||||||
components.month = month + 1
|
components.month = month + 1
|
||||||
components.year = year
|
components.year = year
|
||||||
components.hour = 23
|
components.hour = 23
|
||||||
components.minute = 59
|
components.minute = 59
|
||||||
|
|
||||||
return calendar.date(from: components)!
|
return calendar.date(from: components)!
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private func getStartOfDay(day:Int, month:Int, year:Int) -> Date {
|
||||||
|
let calendar = Calendar.current
|
||||||
|
var components = DateComponents()
|
||||||
|
components.day = day - 1
|
||||||
|
components.month = month
|
||||||
|
components.year = year
|
||||||
|
components.hour = 0
|
||||||
|
components.minute = 0
|
||||||
|
return calendar.date(from: components)!
|
||||||
|
}
|
||||||
|
|
||||||
// private func getAccumualtiveWLByDay(req:Request) {
|
private func getEndOfDay(day:Int, month:Int, year:Int) -> Date {
|
||||||
//
|
let calendar = Calendar.current
|
||||||
// let winLossRatio:[String:Double] = [:]
|
var components = DateComponents()
|
||||||
//
|
components.day = day - 1
|
||||||
// let matches = Match.query(on:req.db)
|
components.month = month
|
||||||
// .sort(\.$date)
|
components.year = year
|
||||||
// .all()
|
components.hour = 23
|
||||||
//
|
components.minute = 59
|
||||||
// var ratio = 0.0
|
return calendar.date(from: components)!
|
||||||
// var cumulativeWLRatio = req.eventLoop.future(ratio)
|
}
|
||||||
//
|
|
||||||
// matches.map { (matches) -> [String:Double] in
|
|
||||||
//
|
|
||||||
// let winLossRatio2:[String:Double] = [:]
|
|
||||||
//
|
|
||||||
// matches.reduce(Dictionary<String:Double>()) { (partialRatio, match) -> [String:Double] in
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -156,50 +172,32 @@ struct StatsController: RouteCollection {
|
|||||||
func all(req: Request) throws -> EventLoopFuture<AllStats> {
|
func all(req: Request) throws -> EventLoopFuture<AllStats> {
|
||||||
|
|
||||||
|
|
||||||
struct MonthYear {
|
|
||||||
let month:Int
|
|
||||||
let year:Int
|
|
||||||
}
|
|
||||||
|
|
||||||
let calendar = Calendar.current
|
var date = getStartDate()
|
||||||
|
var previousMonths:[CODDate] = []
|
||||||
var components = DateComponents()
|
|
||||||
components.day = 01
|
|
||||||
components.month = 03
|
|
||||||
components.year = 2020
|
|
||||||
components.hour = 0
|
|
||||||
components.minute = 0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var date = calendar.date(from: components)!
|
|
||||||
var previousMonths:[MonthYear] = []
|
|
||||||
|
|
||||||
|
|
||||||
repeat {
|
repeat {
|
||||||
//let stats = getStatsByMonth(year: date.year, month: date.month, req: req) //returns eventloopfuture<Stats>
|
//let stats = getStatsByMonth(year: date.year, month: date.month, req: req) //returns eventloopfuture<Stats>
|
||||||
previousMonths.append(MonthYear(month: date.month, year: date.year))
|
previousMonths.append(CODDate(month: date.month, year: date.year, day: 15))
|
||||||
date = Calendar.current.date(byAdding: .month, value: 1, to: date)!
|
date = Calendar.current.date(byAdding: .month, value: 1, to: date)!
|
||||||
} while (date.month != (Date().month + 1) || date.year != Date().year)
|
} while (date.month != (Date().month + 1) || date.year != Date().year)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func getMonthStats (_ remaining: ArraySlice<MonthYear>, allMonthlyStats: inout [MonthStats], eventLoop: EventLoop) -> EventLoopFuture<[MonthStats]> {
|
func getMonthStats (_ remaining: ArraySlice<CODDate>, allMonthlyStats: inout [MonthStats], eventLoop: EventLoop) -> EventLoopFuture<[MonthStats]> {
|
||||||
var remaining = remaining
|
var remaining = remaining
|
||||||
if let first = remaining.popLast() {
|
if let first = remaining.popLast() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return getStatsByMonth(year: first.year, month: first.month, req: req).flatMap { [remaining, allMonthlyStats] (stats) -> EventLoopFuture<[MonthStats]> in
|
return getstatsForMonth(year: first.year, month: first.month, req: req).flatMap { [remaining, allMonthlyStats] (stats) -> EventLoopFuture<[MonthStats]> in
|
||||||
print ("remaining \(remaining)")
|
|
||||||
var allMonthlyStats = allMonthlyStats
|
var allMonthlyStats = allMonthlyStats
|
||||||
allMonthlyStats.append(MonthStats(month: first.month, year: first.year, stats:stats ))
|
allMonthlyStats.append(MonthStats(month: first.month, year: first.year, stats:stats ))
|
||||||
return getMonthStats(remaining, allMonthlyStats:&allMonthlyStats, eventLoop: eventLoop)
|
return getMonthStats(remaining, allMonthlyStats:&allMonthlyStats, eventLoop: eventLoop)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print ("rett")
|
|
||||||
return req.eventLoop.makeSucceededFuture(allMonthlyStats)
|
return req.eventLoop.makeSucceededFuture(allMonthlyStats)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,37 +209,6 @@ struct StatsController: RouteCollection {
|
|||||||
return try overall(req: req).and(monthstats).map { (overall, monthlyStats) -> AllStats in
|
return try overall(req: req).and(monthstats).map { (overall, monthlyStats) -> AllStats in
|
||||||
return AllStats.init(overall: overall, byMonth: monthlyStats)
|
return AllStats.init(overall: overall, byMonth: monthlyStats)
|
||||||
}
|
}
|
||||||
// return getMonthStats(previousMonths, eventLoop: req.eventLoop)
|
|
||||||
|
|
||||||
|
|
||||||
// var date = Date(year: 2020, month: 03, day: 01, hour: 0, minute: 0)
|
|
||||||
// var monthlyStats = [String:Stats]()
|
|
||||||
// repeat {
|
|
||||||
// let stats = getStatsByMonth(year: date.year, month: date.month, req: req) //returns eventloopfuture<Stats>
|
|
||||||
// monthlyStats["\(date.month) \(date.year)"] = stats.map({ (newStats) -> (Stats) in
|
|
||||||
// return Stats(winLoss: newStats.winLossRatio, totalWins: newStats.totalWins, totalLosses: newStats.totalLosses)
|
|
||||||
// })
|
|
||||||
// date = Calendar.current.date(byAdding: .month, value: 1, to: date)!.date
|
|
||||||
// } while (date.month != Date().month || date.year != Date().year)
|
|
||||||
////
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// let combined = try overall(req: req).and(req.eventLoop.future(monthlyStats))
|
|
||||||
// return combined.map { (stats, dict) -> (AllStats) in
|
|
||||||
// return AllStats(overall: stats, byMonth: monthlyStats )
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let combined = try overall(req: req).and(
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -269,20 +236,74 @@ struct StatsController: RouteCollection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//
|
|
||||||
|
|
||||||
// func create(req: Request) throws -> EventLoopFuture<Beacon> {
|
func allDaily(req:Request) -> EventLoopFuture<AllDailyStats>{
|
||||||
// let newBeacon = try req.content.decode(Beacon.Create.self)
|
|
||||||
// let beacon = Beacon(id: UUID(), ownerId: nil)
|
var date = getStartDate()
|
||||||
// return beacon.save(on: req.db).map { beacon }
|
var previousDays:[CODDate] = []
|
||||||
// }
|
|
||||||
//
|
|
||||||
// func delete(req: Request) throws -> EventLoopFuture<HTTPStatus> {
|
repeat {
|
||||||
// return Beacon.find(req.parameters.get("beaconID"), on: req.db)
|
previousDays.append(CODDate(month: date.month, year: date.year, day: date.day))
|
||||||
// .unwrap(or: Abort(.notFound))
|
date = Calendar.current.date(byAdding: .day, value: 1, to: date)!
|
||||||
// .flatMap { $0.delete(on: req.db) }
|
|
||||||
// .transform(to: .ok)
|
} while (date < Date())
|
||||||
// }
|
|
||||||
|
|
||||||
|
func getDailyStats (_ remaining: ArraySlice<CODDate>, allDailyStats: inout [DailyStats], eventLoop: EventLoop) -> EventLoopFuture<[DailyStats]> {
|
||||||
|
var remaining = remaining
|
||||||
|
if let first = remaining.popLast() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return getStatsForDay(year: first.year, month: first.month, day:first.day, req: req).flatMap { [remaining, allDailyStats] (stats) -> EventLoopFuture<[DailyStats]> in
|
||||||
|
var allDailyStats = allDailyStats
|
||||||
|
allDailyStats.append(DailyStats(day: first.day, month: first.month, year: first.year, stats: stats))
|
||||||
|
return getDailyStats(remaining, allDailyStats:&allDailyStats, eventLoop: eventLoop)
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return req.eventLoop.makeSucceededFuture(allDailyStats)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var stats:[DailyStats] = []
|
||||||
|
let dailyStats = getDailyStats(previousDays[0..<previousDays.count], allDailyStats:&stats, eventLoop: req.eventLoop)
|
||||||
|
|
||||||
|
return dailyStats.map { (dailyStats) -> AllDailyStats in
|
||||||
|
return AllDailyStats(dailyStats: dailyStats.filter({ (dailyStats) -> Bool in
|
||||||
|
if dailyStats.stats.totalWins == 0 && dailyStats.stats.totalLosses == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// func allCumulativeStats(req:Request) -> EventLoopFuture<AllRollingStats> {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
private func getStartDate() -> Date {
|
||||||
|
|
||||||
|
let calendar = Calendar.current
|
||||||
|
|
||||||
|
var components = DateComponents()
|
||||||
|
components.day = 20
|
||||||
|
components.month = 03
|
||||||
|
components.year = 2020
|
||||||
|
components.hour = 0
|
||||||
|
components.minute = 0
|
||||||
|
|
||||||
|
return calendar.date(from: components)!
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -305,4 +326,9 @@ extension Date {
|
|||||||
let calanderDate = Calendar.current.dateComponents([.day, .month, .year], from: self)
|
let calanderDate = Calendar.current.dateComponents([.day, .month, .year], from: self)
|
||||||
return calanderDate.year ?? 1
|
return calanderDate.year ?? 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var day:Int {
|
||||||
|
let calanderDate = Calendar.current.dateComponents([.day, .month, .year], from: self)
|
||||||
|
return calanderDate.day ?? 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,36 @@ final class Stats: Content {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final class AllDailyStats: Content {
|
||||||
|
var dailyStats : [DailyStats]
|
||||||
|
|
||||||
|
init(dailyStats:[DailyStats]) {
|
||||||
|
self.dailyStats = dailyStats
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
final class AllRollingStats: Content {
|
||||||
|
var cumulativeStats:[DailyStats]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final class DailyStats: Content {
|
||||||
|
|
||||||
|
var day: String
|
||||||
|
var month:String
|
||||||
|
var year: String
|
||||||
|
var stats:Stats
|
||||||
|
|
||||||
|
init(day:Int, month:Int, year:Int, stats:Stats) {
|
||||||
|
self.day = String(day)
|
||||||
|
self.month = Utilities.monthToString(month: month)
|
||||||
|
self.year = String(year)
|
||||||
|
self.stats = stats
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class Utilities {
|
class Utilities {
|
||||||
class func monthToString(month:Int) -> String {
|
class func monthToString(month:Int) -> String {
|
||||||
switch month {
|
switch month {
|
||||||
|
|||||||
Reference in New Issue
Block a user