Wrong dates shown in Jekyll-based blog - yaml

I have posted two posts to my blog in the past two days. As you can see, both are dated Nov 1, 2017. I correctly named the files with their respective dates as you can see in the github repofor this blog. What is going on here? Why do the posts show the wrong date?

You have in the YML the following date:
2017-10-20 0800:00:00 -0600
This should be:
2017-10-20 08:00:00 -0600
(The first colon is preceded by too many zero's)

Related

localization NSPredicateEditor / NSPredicateEditorRowTemplate

what I want to get
how make a localisation with NSPredicateEditorRowTemplate
it is not well documented
it was a total pain to figure out.
all is written programmatically
I would like a French, Italian version etc.
https://github.com/thierryH91200/THPredicateEditorSwift
Localizing an NSPredicateEditor is a bit more involved than usual localisation.
First, you'll need to have NSLocalizedString() calls in your code somewhere so that genstrings is able to find them.
Secondly, the key needs to follow a special format that will instruct genstrings to produce all combinations of a given row:
NSLocalizedStringFromTable(#"%[Any, All, None]# of the following are true", #"Predicate", #"localize the compound row template")
NSLocalizedStringFromTable(#"%[property]# %[is, is not, contains, begins with, ends with, like, matches]# %#", #"Predicate", #"localize the string row template")
NSLocalizedStringFromTable(#"%[birthMonth]# %[is, is not]# %[January, February, March, April, May, June, July, August, September, October, November, December]#", #"Predicate", #"localize the selection row template")
In the example above genstrings will look at the options between brackets and generate a localisation string for all combinations in the Predicate.strings file.
Finally, you must let your NSPredicateEditor instance know which strings file to use by setting the formattingStringsFilename property.
See this blog post for more information.
the blog is a few years old.
xcode has improved over the years.
the question is duplicate but the answers may be different a few years later.
the answer is simple. it is the localization of the xib file and it works perfectly

Automator Service for Notes + Calendar

I've been trying to figure this out for a while. Is there a way to set up a service that would parse a Note and create calendar events based on each line from that Note?
For example, say that the contents of my note are as follows:
December 1 9:00AM - 5:00PM
December 2 9:00AM - 5:00PM
December 3 11:30AM - 8:00PM
Is anyone familiar with how to parse this? I'd like to set up a service that would take those dates, and those hours and create calendar events with a default name (ex. "Work"). I'm familiar with how to do it in programming languages like Python or Swift, but I'm still new to scripting.
Any help would be appreciated. Thanks!

Calendar library customisation advice

CodeIgniter has a nice calendar library, but my calendar requirements are a little specific. I would need to display only calendar dates for a range of specific days. For example, Mondays, or Mondays and Fridays, or just weekdays.
For example, Mondays for this month would look like;
<< Mondays in April >>
[4] [11] [18] [25]
I've read the docs and looked at some tutorials, but haven't learned how to do this myself.
Does anyone have any ideas about how to do this with the existing calendar library, or would it be better to build something like this from scratch?
Thanks.
You could use your own made template and extend Calendar class, but It would be troublesome. I think Codeigniter doesn't have the right tool straight of the box for your situation. I would propose calendR. I would parse desired month and took f.e. mondays using API, especially CalendR\Period\Day which has constant MONDAY.

Moment.js displaying date incorrectly

I have a record which reads : date: "2016-02-01 00:00:05. However, when I do moment(date).format("L") the view renders 01/31/2016.
Any idea why? This happens which all dates, always one day before
I found my answer in this post. Auto-answering in case anybody runs into the same issue. As #bschaeffer said, it was a timezone problem, this fixed it:
moment.utc(date).format('L')

Localization when using time.Format

In the time package, when formatting a time.Time variable, the output will use the English names for weeks and months as defined in unexported []string slices.
How to localize the string, using a different language (hopefully still using Format())?
Example:
fmt.Println(time.Now().Format("Mon 2 January 2006"))
Output:
Tue 28 January 2014
Desired output:
Tis 28 Januari 2014
Playground
As you can see in time package sourcecode that values are hardcoded in source. So, basically, Go doesn't support i18n right now. i18n is on Go roadmap, its even mentioned in the faq, but there were no comments on that topic recently.
Meanwhile, you could try to use Monday package:
// Change LocaleEnUS to the locale you want to use for translation
monday.Format(time.Now(), "Mon 2 January 2006", monday.LocaleEnUS)

Resources