I’m looking for a way to parse a string which would replace some patterns with components of a date that I provide.
Do you know of a standard way to do this?
One usage would be:
parseForDate("fileName%YYYY%MM.csv", new Date()); // returns: filename201301.csv
Best regards
Consider using format: