Skip to content

Instantly share code, notes, and snippets.

View goofballLogic's full-sized avatar
👔
Still counting things

Andrew Stewart Gibson goofballLogic

👔
Still counting things
  • 18:27 (UTC +01:00)
View GitHub Profile
const ordinalSuffixes = {
"one": "st",
"two": "nd",
"few": "rd",
"other": "th"
};
const ordinalPluralRules = new Intl.PluralRules("en", { type: "ordinal" });
function withOrdinalSuffix(x) {
const fullFormat = new Intl.DateTimeFormat("en", { dateStyle: "full" });
const ordinalSuffixes = {
"one": "st",
"two": "nd",
"few": "rd",
"other": "th"
};
const ordinalPluralRules = new Intl.PluralRules("en", { type: "ordinal" });
import { OrdinalFormat } from "./ordinal-formatting.js";
const fullFormat = new Intl.DateTimeFormat("en", { dateStyle: "full" });
const now = new Date();
const parts = fullFormat.formatToParts(now);
const weekDayName = parts.find(p => p.type === "weekday").value;
const dayName = parts.find(p => p.type === "day").value;
Feature: Writing a diary entry
As Doogie
I want to be able to write a new entry in my diary
So that I can round off an episode with an uplifting thought
Background: Load the app and start editing
Given I have loaded the app
When I press the space bar
Scenario: I should be able to press space bar to start writing
Feature: Application branding
As Doogie
I want to be bathed in the familiar blue glow of my IBM CRT monitor and text editor
So that I can shift into the right mental model for an uplifting closing diary entry
Feature: Application branding
As Doogie
I want to be bathed in the familiar blue glow of my IBM CRT monitor and text editor
So that I can shift into the right mental model for an uplifting closing diary entry
Background: Load the app
Given I have loaded the app
Scenario: Styling
Then the background colour should be "bright blue"
Feature: Reading diary entries
As Doogie
I want to be able to review my previous diary entries in reverse chronological order
So that I can scan my recent thoughts easily
Feature: Reading diary entries
As Doogie
I want to be able to review my previous diary entries in reverse chronological order
So that I can scan my recent thoughts easily
Scenario: The latest entry should be shown at the top
Given a test entry exists dated 1 month into the future
"""
Raymond and I have a lot in common.
We both have to face prejudice for what we are...
Feature: Writing a diary entry
As Doogie
I want to be able to write a new entry in my diary
So that I can round off an episode with an uplifting thought
{
"@context": {
"@vocab": "http://example.com/"
}
}