Skip to content

Instantly share code, notes, and snippets.

View mattjohnsonpint's full-sized avatar

Matt Johnson-Pint mattjohnsonpint

View GitHub Profile
@mattjohnsonpint
mattjohnsonpint / Program.cs
Last active September 6, 2022 17:15
Airport Time Zones
using System.Text.RegularExpressions;
using GeoTimeZone; // Import from Nuget package "GeoTimeZone" (https://github.com/mattjohnsonpint/GeoTimeZone)
using TimeZoneConverter; // Import from Nuget package "TimeZoneConverter" (https://github.com/mattjohnsonpint/TimeZoneConverter)
namespace AirportTimeZones;
internal static class Program
{
private static void Main()
{

Proposal for a date system overhaul

The Problem

FullCalendar was initially designed without much notion of timezones. By default, it ignores timezone offsets in the dates it receives.

The original assumption was that if you received a date from Brussels, say "2013-09-01T12:00:00+02:00", which is noon, it would display as noon in every timezone.

However, FullCalendar shoehorns this value into a local date. With the same example, if you were in San Francisco, it internally stores the date as "2013-09-01T12:00:00-08:00". This is bad for two reasons:

@evanlarsen
evanlarsen / transitionHelper.js
Last active February 8, 2021 17:12
Durandal transition helper file. This imposes that you are using https://github.com/daneden/animate.css Also, that you have changed the animation duration in animate.css from 1s to .3s
define(function(require) {
var system = require('../system');
var animationTypes = [
'bounce',
'bounceIn',
'bounceInDown',
'bounceInLeft',
'bounceInRight',
'bounceInUp',