Yymmdd Alternatives
Similar projects and alternatives to yymmdd
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
view_component
A framework for building reusable, testable & encapsulated view components in Ruby on Rails.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
yymmdd discussion
yymmdd reviews and mentions
-
Ruby 3.4.0 Released
The language is incredibly flexible and allows for "DSLs" that are just ruby libraries.
A simple example: `3.days.ago` is a very commonly used idiom in Rails projects. Under the hood, it extends the base Number class with `def days` to produce a duration and then extends duration with `def ago` to apply the duration to the current time.
Taking that concept to a bigger extreme is this mostly unnecessary library: https://github.com/sshaw/yymmdd
`yyyy-mm-dd(datestr)` will parse a date str that matches yyyy-mm-dd format. It looks like a special DSL, but it's just Ruby. `dd(datestr)` produces a `DatePart`. Then it's just operator overloading on subtraction to capture the rest of the format and return the parsed date.
That library feels unnecessary, but the entire thing is 100 lines of code. The ease of bending the library to fit a use case led to a very rich ecosystem. The challenge is consistency and predictability, especially with a large team.
-
Ruby has some pretty obscure syntax and operators that allow you to write nonsense like this.
Also see: - https://github.com/sshaw/yymmdd - https://github.com/sshaw/angry_raise
Stats
sshaw/yymmdd is an open source project licensed under MIT License which is an OSI approved license.
The primary programming language of yymmdd is Ruby.