Skip to content

Instantly share code, notes, and snippets.

@oscarmorrison
oscarmorrison / IFTTTDate.md
Last active December 3, 2023 21:44
Make IFTTT Date Format play nice with Google Spreadsheets

##Date and Time

=TIMEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " ")) + DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))

##Date

=DATEVALUE(SUBSTITUTE("{{OccurredAt}}"," at ", " "))

##Time

@coryschires
coryschires / hasherize.rb
Created January 1, 2012 22:18
Cucumber helper method which makes it easier to work with tabular data
# Starts with cucumber's built-in hashes method and adds a bit more magic:
#
# * Converts hash keys from stings to symbols
# * Converts numeric values into integers
# * Converts true/false strings into actual booleans
#
def hasherize(table)
table.hashes.map do |object|
object.each do |attribute, value|
object[attribute] = to_boolean?(value)