garyjones / daterange Goto Github PK
View Code? Open in Web Editor NEWPHP: Display a range of dates, with consolidated time parts.
License: MIT License
PHP: Display a range of dates, with consolidated time parts.
License: MIT License
@AMNDesign wants to have a format of M jS Y
(albeit with <sup></sup>
tags, but that's redundant here) and have an output like Jun 25th – 28th 2018
- that is, with the Month part always displaying on the start date.
Where the months differ, it should display like Jun 25th – Jul 28th 2018
.
The issue stems from the current logic which assumes that the end date format stays consistent, and only the start date is consolidated.
A string like 'd~M\Y'
, 'd~M\\Y'
and 'd~M\\\Y'
are not handled correctly. Current unit tests fail, since the output includes Y
, when it shouldn't.
A string like 'M j<\s\up>S</\s\up> Y'
does pass, thanks to the crude attempt at handling escaped characters.
DateFormat::isEscapedCharacter()
function needs revisiting.
The new approach in 0.2.0
needs an exception for hours, minutes, and seconds since they will always appear in the order where the next character represents a smaller time part.
A string like 'YdMymdMYDm'
is not handled correctly, due to the new approach in 0.2.0
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.