<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Date Format Modification to dd-Mmm-YYYY]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3327&amp;type=atom" />
	<updated>2012-10-04T16:43:05Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3327</id>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13633#p13633" />
			<content type="html"><![CDATA[<p>Hg unstable branch has been updated. Thank you Apmuthu.<br />Janusz</p>]]></content>
			<author>
				<name><![CDATA[itronics]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=89</uri>
			</author>
			<updated>2012-10-04T16:43:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13633#p13633</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13594#p13594" />
			<content type="html"><![CDATA[<p>Have bundled the <a href="http://www.apmuthu.com/bugfixes/frontac_24a_3073_corrections.zip">consolidated unstable branch sql bugfix</a> to help Janusz incorporate them easily - both changed files and patches.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-10-03T08:41:45Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13594#p13594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13592#p13592" />
			<content type="html"><![CDATA[<p>Please be patient a little while, apmuthu.</p><p>Awaiting Janusz approval to move FrontAccounting Next (Private) to FrontAccounting 2.4.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-10-03T07:42:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13592#p13592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13588#p13588" />
			<content type="html"><![CDATA[<p>Alternatively, it should suffice to delete the said <strong>js</strong> files from each <strong>/company/X/js_cache</strong> folder.</p><p>Well done Joe!</p><p>Unrelated aside: </p><p>Bugfixes 1809-12 pertaining to unstable became marked as access denied in Mantis. Bugfix 1785 is still awaiting inclusion. (Role Elevation from reporter to developer in Mantis has not alleviated the Access denied status for following up on the said Bugs)</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-10-03T01:49:22Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13588#p13588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13586#p13586" />
			<content type="html"><![CDATA[<p>This has now been pushed to HG repository.</p><p>Please be aware that when changing date format and/or date separator, that you may need to refresh the page several times to let the js script files, inserts.js and date_picker.js to be copied to /company/X/js_cashe folder where X is the company number.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-10-02T21:41:24Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13586#p13586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13584#p13584" />
			<content type="html"><![CDATA[<p>Wow! That&#039;s great. You&#039;re the fastest in updating the repo!</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-10-02T18:55:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13584#p13584</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13572#p13572" />
			<content type="html"><![CDATA[<p>Apmuthu, I just got some spare-time and have implemented the new Mmm formatting for all the former date formats.</p><p>It was reasonaly simple to do, because I initially created the date_picker and the date_functions.</p><p>I am just making regorious testing to avoid side-effects, but haven&#039;t found any yet. But I am continuing a bit.</p><p>After that I will commit it to HG repository.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-10-01T21:31:27Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13572#p13572</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13334#p13334" />
			<content type="html"><![CDATA[<p>This is ok, Apmuthu. Please continue delving into this formatting. As this can always be implementied during a minor release, we are not in a hurry.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-09-12T18:44:00Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13334#p13334</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13332#p13332" />
			<content type="html"><![CDATA[<p>The above does NOT WORK at all. There is no question of including it for now. I am in the process of digging into what all code is getting affected. </p><p>The date picker does not work at all correctly for this feature choice as of now.</p><p>This is only a preliminary delving into the mire that the code currently is.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-09-12T17:29:55Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13332#p13332</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13327#p13327" />
			<content type="html"><![CDATA[<p>This looks promissing, Amuthu. But let it mature a bit, before we include it in FA core. Maybe we need more formatting, like Jan 06 2012 or 2012 Jan 06. I don&#039;t know how needed this is, but I understand that the Asian Countries use this format a lot.<br />Letting it be world wide, we only need to replace the month digits with the short month name. </p><p>I am positive to this, just wanting it to mature a bit.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2012-09-11T21:26:30Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13327#p13327</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13326#p13326" />
			<content type="html"><![CDATA[<p>Anyone wishing to carry on this development can take the modified and unmodified files (based on FA v2.3.11+ Mercurial changeset 3053) altered here from:</p><p><a href="http://www.apmuthu.com/bugfixes/fac-dev-newdateformat.zip">http://www.apmuthu.com/bugfixes/fac-dev … format.zip</a></p><p>No way to upload files here!</p><p><a href="http://www.tutorialspoint.com/javascript/javascript_tutorial.pdf">JS Tute</a></p><p>includes/ui/simple_crud_class.inc has some functions with no change in formatting dates - maybe need to use them - <strong>_format_output</strong> and <strong>_format_input</strong></p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-09-11T17:19:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13326#p13326</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13325#p13325" />
			<content type="html"><![CDATA[<p>Ref Code:<br /><strong>date_cells(_(&quot;From:&quot;), &#039;AfterDate&#039;, &#039;&#039;, null, -30);</strong></p><p>The html output in FF 15.0.1 for an incorrect display for this format that now shows for one field is:<br /></p><div class="codebox"><pre><code>&lt;input 
    autocomplete=&quot;off&quot; 
    _last_val=&quot;2012-07-13&quot; 
    name=&quot;AfterDate&quot; 
    class=&quot;date&quot; 
    size=&quot;10&quot; 
    maxlength=&quot;12&quot; 
    value=&quot;2012-07-13&quot; 
    type=&quot;text&quot;&gt; 
&lt;a 
    tabindex=&quot;-1&quot; 
    href=&quot;javascript:date_picker(document.getElementsByName(&#039;AfterDate&#039;)[0]);&quot;&gt;    
&lt;img 
    src=&quot;../../themes/default/images/cal.gif&quot; 
    alt=&quot;Click Here to Pick up the date&quot; 
    border=&quot;0&quot; 
    height=&quot;16&quot; 
    width=&quot;16&quot;&gt;
&lt;/a&gt;</code></pre></div><p>Ref Code:<br /><strong>date_cells(_(&quot;To:&quot;), &#039;BeforeDate&#039;);</strong></p><p>The html output in FF 15.0.1 for a correct initial display field (but not working input function) would be like:<br /></p><div class="codebox"><pre><code>&lt;input 
    autocomplete=&quot;off&quot; 
    _last_val=&quot;12-Aug-2012&quot; 
    name=&quot;BeforeDate&quot; 
    class=&quot;date&quot; 
    size=&quot;10&quot; 
    maxlength=&quot;12&quot; 
    value=&quot;12-Aug-2012&quot; 
    type=&quot;text&quot;&gt; 
&lt;a 
    tabindex=&quot;-1&quot; 
    href=&quot;javascript:date_picker(document.getElementsByName(&#039;BeforeDate&#039;)[0]);&quot;&gt;    
&lt;img 
    src=&quot;../../themes/default/images/cal.gif&quot; 
    alt=&quot;Click Here to Pick up the date&quot; 
    border=&quot;0&quot; 
    height=&quot;16&quot; 
    width=&quot;16&quot;&gt;
&lt;/a&gt;</code></pre></div><p>The initial input size value of 10 may need to become 11 for this format....</p><p>The parameters for the functions <strong>date_cells</strong> and <strong>date_row</strong> are same and for reference are:<br /></p><div class="codebox"><pre><code>$label, 
$name, 
$title = null, 
$check=null, 
$inc_days=0, 
$inc_months=0, 
$inc_years=0, 
$params=null, 
$submit_on_change=false</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-09-11T16:34:34Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13325#p13325</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13324#p13324" />
			<content type="html"><![CDATA[<p>Additional places that need to be modified will be the date picker in the files </p><p><strong>includes/ui/ui_input.inc</strong> (function date_cells)<br />and <br /><strong>includes/ui/ui_view.inc</strong> (function get_js_date_picker)</p><p>The insertion places in <strong>function get_js_date_picker</strong> would be:<br />At line 842</p><div class="codebox"><pre><code>    $monthst = array(_(&quot;Jan&quot;),_(&quot;Feb&quot;),_(&quot;Mar&quot;),_(&quot;Apr&quot;),_(&quot;May&quot;),_(&quot;Jun&quot;),_(&quot;Jul&quot;),_(&quot;Aug&quot;),_(&quot;Sep&quot;),_(&quot;Oct&quot;),_(&quot;Nov&quot;),_(&quot;Dec&quot;));</code></pre></div><p>and in the js string at line 922</p><div class="codebox"><pre><code>  var monthst = [&#039;$monthst[0]&#039;,&#039;$monthst[1]&#039;,&#039;$monthst[2]&#039;,&#039;$monthst[3]&#039;,&#039;$monthst[4]&#039;,&#039;$monthst[5]&#039;,&#039;$monthst[6]&#039;,&#039;$monthst[7]&#039;,&#039;$monthst[8]&#039;,&#039;$monthst[9]&#039;,&#039;$monthst[10]&#039;,&#039;$monthst[11]&#039;];</code></pre></div><p>Lines around 1043 can now be altered to:<br /></p><div class="codebox"><pre><code>    if ($how == 0)
        $js .= &quot;
      var dateString = month+&#039;$sep&#039;+day+&#039;$sep&#039;+year;
&quot;;
    else if ($how == 1)
        $js .= &quot;
      var dateString = day+&#039;$sep&#039;+month+&#039;$sep&#039;+year;
&quot;;
    else if ($how == 2)
        $js .= &quot;
      var dateString = year+&#039;$sep&#039;+month+&#039;$sep&#039;+day;
&quot;;
    else // ($how == 3)
        $js .= &quot;
      var dateString = year+&#039;$sep&#039;+monthst[month-1]+&#039;$sep&#039;+day;
&quot;;</code></pre></div><p>Lines around 1180 can now be altered to:<br /></p><div class="codebox"><pre><code>    if ($how == 3)
        $js .= &quot;
        selectedDay = parseInt(dateParts[0],10);
        selectedMonth = monthst.indexOf(dateParts[1])+1;
        selectedYear = parseInt(dateParts[2],10);
&quot;;
    else if ($how == 0)
        $js .= &quot;
        selectedMonth = parseInt(dateParts[0],10);
        selectedDay = parseInt(dateParts[1],10);
        selectedYear = parseInt(dateParts[2],10);
&quot;;
    else if ($how == 1)
        $js .= &quot;
        selectedDay = parseInt(dateParts[0],10);
        selectedMonth = parseInt(dateParts[1],10);
        selectedYear = parseInt(dateParts[2],10);
&quot;;
    else
        $js .= &quot;
        selectedYear = parseInt(dateParts[0],10);
        selectedMonth = parseInt(dateParts[1],10);
        selectedDay = parseInt(dateParts[2],10);
&quot;;</code></pre></div><br /><p>It still does not work fully........</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-09-11T16:25:43Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13324#p13324</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13323#p13323" />
			<content type="html"><![CDATA[<p>Proposed changes for additional date format.</p><p>File: <strong>config.php / config.default.php</strong><br />Replace Line 139:<br />&nbsp; &nbsp; $dateformats &nbsp; &nbsp; = array(&quot;MMDDYYYY&quot;, &quot;DDMMYYYY&quot;, &quot;YYYYMMDD&quot;);<br />With:<br />&nbsp; &nbsp; $dateformats &nbsp; &nbsp; = array(&quot;MMDDYYYY&quot;, &quot;DDMMYYYY&quot;, &quot;YYYYMMDD&quot;, &quot;DDMmmYYYY&quot;);</p><p>Correct &quot;defalt&quot; to &quot;default&quot; in commented line 143.</p><p>File: <strong>includes/date_functions.inc</strong></p><p>1. <br />Replace lines 38-39:<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; return $year.$sep.$month.$sep.$day;<br />With:<br />&nbsp; &nbsp; elseif ($how == 2)<br />&nbsp; &nbsp; &nbsp; &nbsp; return $year.$sep.$month.$sep.$day;<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; return $day.$sep.date(&#039;M&#039;, $year.$month.$day).$sep.$year;</p><p>2. Altered fragment in <strong>function is_date($date_) </strong></p><div class="codebox"><pre><code>    elseif (strlen($date_) == 8)
    {
        if ($how == 3) // So as not to affect Jalali processing
        {
            $day = substr($date_,0,1);
            $month = date(&#039;m&#039;, strtotime(substr($date_,1,3)));
            $year = substr($date_,4,4);
        }
        elseif ($how == 0)
        {
            $day = substr($date_,2,2);
            $month = substr($date_,0,2);
            $year = substr($date_,4,4);
        } 
        elseif ($how == 1)
        {
            $day = substr($date_,0,2);
            $month = substr($date_,2,2);
            $year = substr($date_,4,4);
        } 
        else
        {
            $day = substr($date_,6,2);
            $month = substr($date_,4,2);
            $year = substr($date_,0,4);
        }
    }
    elseif (strlen($date_) == 9)
    {
        if ($how == 3)
        {
            $day = substr($date_,0,2);
            $month = date(&#039;m&#039;, strtotime(substr($date_,2,3)));
            $year = substr($date_,5,4);
        }
        else
            return 0;
    }</code></pre></div><p>3. Altered fragment in <strong>function sql2date[$date_) </strong><br /></p><div class="codebox"><pre><code>    // Split up the date by the separator based on &quot;how&quot; to split it
    if ($how == 0) // MMDDYYYY
        list($month, $day, $year) = explode($sep, $date_);
    elseif ($how == 1) // DDMMYYYY
        list($day, $month, $year) = explode($sep, $date_);
    elseif ($how == 2) // YYYYMMDD
        list($year, $month, $day) = explode($sep, $date_);
    elseif ($how == 3) // DDMmmYYYY
        list($year, $month, $day) = explode($sep, date(&#039;Y-m-d&#039;, strtotime($date_)));
    else
        return &quot;&quot;;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-09-11T14:57:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13323#p13323</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Date Format Modification to dd-Mmm-YYYY]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=13305#p13305" />
			<content type="html"><![CDATA[<p>Thanks for the info Janusz. Please direct me to where you have a Roadmap listed.</p><p>Will work on this feature when time permits as it needs a complete implementation.&nbsp; This is the preferred date format in ASEAN countries what with the EU/US confusion on the date score...especially for CPAs who need to cater to clients across the globe and have &quot;unambiguous&quot; reports.</p><p>We need to cull out all instances of<br />1. Date Display<br />2. Date Form Fields<br />3. Date Picker (through wrapper function)<br />4. Date Picker (any unwrapped)<br />5. Date field computation<br />6. Date in SQL unabstracted</p><p>Any inputs here will help make for a smooth integration without catastrophic suprises.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-09-10T03:08:26Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=13305#p13305</id>
		</entry>
</feed>
