X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=format.php;h=13d79ce53942b8a80d2b9d347bd42c5105913f5d;hb=ea6a853c31842f2c13400c38afa9a539d8f14406;hp=451ba21dda404319ce520d2726800db62666ff53;hpb=b57ed00acb7392eff295093d4dfa60d61b018a7d;p=wfpl.git diff --git a/format.php b/format.php index 451ba21..13d79ce 100644 --- a/format.php +++ b/format.php @@ -178,7 +178,7 @@ function format_unix($str) { } function format_bool($str) { - if($str && $str !== 'No' && $str !== 'False' && $str !== 'false') { + if($str && $str !== 'No' && $str !== 'False' && $str !== 'false' && $str !== 'no' && $str !== 'N' && $str !== 'n') { return 1; } else { return 0; @@ -186,7 +186,7 @@ function format_bool($str) { } function format_yesno($str) { - if($str && $str !== 'No' && $str !== 'False' && $str !== 'false') { + if($str && $str !== 'No' && $str !== 'False' && $str !== 'false' && $str !== 'no' && $str !== 'N' && $str !== 'n') { return 'Yes'; } else { return 'No'; @@ -292,6 +292,7 @@ function format_dollars($str) { # date is edited as mm/dd/yyyy but stored as yyyy-mm-dd function format_mdy_to_ymd($str) { + if($str == '') return ''; require_once('code/wfpl/time.php'); return mdy_to_ymd(format_oneline($str)); }