utils


cfpm add utils

A Collection of Helpful Utilities for Coldfusion


v0.0.6 - Fixing Time Parse
8/23/16 4:02 PM
v0.0.5 - Minor bug fixes
8/17/16 6:43 PM
v0.0.4 - Minor bug fix and better error
6/27/16 6:54 PM
v0.0.3 - Adding API for Utils and sortArrayOfStructs
6/22/16 4:02 PM
v0.0.2 - Small fix with time function
4/26/16 3:01 PM
v0.0.1 - Initial Release
4/21/16 7:19 PM

# UtilsCF Basic utilities that makes ColdFusion bearable ##Installation UtilsCF is installed using CFPM or can be downloaded from source ###CFPM cfpm add utils ## Basic Methods ### upperCaseWords(string) Return a string with the first letter of each work capitalized ### parseQueryString(string) Parses a query string into a nice key value struct ### time(time='', format='') Handles times. Without any parameters passed, sends back current unix time stamp. var unixTimeStamp = application('utils').time(); With time being passed in, determines if unix time stamp, and converts it to ColdFusion native DateTime, else, converts ColdFusion native DateTime to unix time stamp. var dateTime = application('utils').time(unixTimeStamp); var unixTimeStamp = application('utils').time(NOW()); With format being passed in, and with time empty or with time being passed in, converts either NOW() or time into human legibal format using dateTimeFormat var date = application('utils').time(unixTimeStamp, 'short'); // MM/DD/YY HH:MM AM|PM var date = application('utils').time(NOW(), 'short'); // MM/DD/YY HH:MM AM|PM ### sortArrayofStructs(array, key, order='asc') Sorts and Array of Structs. ## Request (HTTP Calls) See [RequestCF](https://github.com/Prefinem/RequestCF)