Skip to content

Instantly share code, notes, and snippets.

View Fernando-Fernandez's full-sized avatar

Fernando Fernandez Fernando-Fernandez

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>62.0</apiVersion>
<environments>Default</environments>
<formulas>
<name>hourInUserTZ</name>
<dataType>Number</dataType>
<expression>VALUE( MID( {!currentDateTimeTemplate}, FIND( &quot; &quot;, {!currentDateTimeTemplate} ) + 1, FIND( &quot;:&quot;, {!currentDateTimeTemplate} ) - FIND( &quot; &quot;, {!currentDateTimeTemplate} ) - 1 ) )</expression>
<scale>0</scale>
</formulas>
public static Map<String, String> monthMap = new Map<String, String> {
'1' => 'January', '2' => 'February', '3' => 'March', '4' => 'April'
, '5' => 'May', '6' => 'June', '7' => 'July', '8' => 'August'
, '9' => 'September', '10' => 'October', '11' => 'November'
, '12' => 'December'
};
public static Map<String, String> dayOfWeekMap = new Map<String, String> {
'1' => 'Sunday', '2' => 'Monday', '3' => 'Tuesday', '4' => 'Wednesday'