Nsdateformatter.com
Source code for nsdateformatter.com. Built with Swift using Vapor. Hosted on Heroku.
Install / Use
/learn @subdigital/Nsdateformatter.comREADME
NSDateFormatter
This is a Swift web application that offers live date formatting using DateFormatter on the server.
This is useful for Swift and Objective-C developers as a way to test out behavior without having to compile & run over and over again.
It was originally written as a means to learn Swift on Linux. It stayed because so many people found it useful!
The Tech Stack
Backend
- Swift 5.9
- Vapor 4
Frontend
- Svelte
- Vite
- Tailwindcss
Deployment
(Previously: Digital Ocean, Heroku)
Current: Netlify front-end, AWS Lambda for backend.
Front-end
The front-end is written in Svelte and uses Vite as a development server.
To run the dev server:
npm run dev
To build the dist folder that contains all the final files for deployment:
npm run build
This is automatically run by Netlify upon deployment.
Running the App Locally
You can use Xcode or launch it via command line.
To build & run the vapor backend server:
swift run
Keep in mind that you have to stop & restart for any Swift-level change.
You'll also need to run the front-end server:
cd front-end && npm run dev
Connect to this front-end server in your browser.
Deployment
This app can run essentially anywhere (and has). The Dockerfile can be used to deploy this on a number of cloud infrastructure or PAAS providers.
Currently this is done with AWS Lambda and Netlify.
To deploy the backend server, run:
just deploy
This will build the docker image and deploy it with a SAM template.
The Netlify deployment happens on a git push.
MIT License
The source code to this application is released under the MIT license. See LICENSE.
Inspired by
This site was inspired by foragoodstrftime.com, which does the same thing but for Ruby. 🍻
Contributions
Pull requests are welcome. Keep in mind that not all suggestions will make it in, as I want this to be an easy to use resource, not an exhaustive list of everything DateFormatter can do.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
