Sugar icon indicating copy to clipboard operation
Sugar copied to clipboard

A Javascript library for working with native objects.

Results 96 Sugar issues
Sort by recently updated
recently updated
newest added

Example date string (from MacOS localisation settings): Saturday, 2 May 2015 at 23.52.26 This gives an Invalid Date, while 'Saturday, 2 May 2015 at 23:52:26' works fine. I feel that...

Sugar.js is wonderful and makes writing JavaScript much more enjoyable. As I've been looking into [TypeScript](http://www.typescriptlang.org/) and some its tooling, I've been thinking Sugar.js would be an excellent complement. IntelliSense-like...

Docs
Feature

1. Abbreviations end with a dot (.), eg `jan.` not `jan`. Is it correct to use `\\.?` 1. Is the code case-sensitive or case-insensitive? 1. The first day of the...

[This fallback logic](https://github.com/andrewplummer/Sugar/blob/2.0.6/lib/date.js#L1511-L1513) seems to be adding the tzOffset when it should be subtracting. At least, that would give a more consistent result. There may be some purpose for adding...

Testing on the latest version (in console at: https://sugarjs.com/dates/), I notice that this string fails to be parsed: `mié, 25 ago. 2021 16:19` However, this, string succeeds: `25 ago. 2021...

'mês que vem' is like 'the upcoming month'

Hi! I have tried the `Date.create` function with severals date patterns and it works perfectly but I found that it only works if the string **only** includes the date. If...

When you format a number that would be expressed using exponential notation by javascript and the base has a decimal part the decimals and the exponent is prepended to the...

`Sugar.String.titleize` does not format the string following the specified acronym. `Sugar.String.addAcronym("QA");` `Sugar.String.titleize("qa_pending")` **Expected Output:** QA Pending **Actual Output:** Qa Pending

Hi, I actually tried to get dates with this format (04.05 -> 5 april ) but it returns that as an hour I tried to do `Sugar.Date.getLocale('en').addFormat('{month}\.{day}')` and also tried...