Skip to content

Instantly share code, notes, and snippets.

View jz709u's full-sized avatar

J jz709u

  • Denver
View GitHub Profile
@mecid
mecid / Calendar.swift
Last active May 8, 2024 13:30
SwiftUI Calendar view using LazyVGrid
import SwiftUI
extension Calendar {
func generateDates(
inside interval: DateInterval,
matching components: DateComponents
) -> [Date] {
var dates: [Date] = []
dates.append(interval.start)
@dduan
dduan / XCTest+Eventually.swift
Last active January 11, 2023 00:26
A simple "eventually" method to aide asynchronous testing with XCTest
import XCTest
extension XCTestCase {
/// Simple helper for asynchronous testing.
/// Usage in XCTestCase method:
/// func testSomething() {
/// doAsyncThings()
/// eventually {
/// /* XCTAssert goes here... */