diff options
Diffstat (limited to 'files/id/web/javascript/reference/global_objects/date/totimestring/index.html')
| -rw-r--r-- | files/id/web/javascript/reference/global_objects/date/totimestring/index.html | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/files/id/web/javascript/reference/global_objects/date/totimestring/index.html b/files/id/web/javascript/reference/global_objects/date/totimestring/index.html deleted file mode 100644 index 90ebd23e68..0000000000 --- a/files/id/web/javascript/reference/global_objects/date/totimestring/index.html +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: Date.prototype.toTimeString() -slug: Web/JavaScript/Reference/Global_Objects/Date/toTimeString -tags: - - Date - - JavaScript - - Prototype - - Referensi -translation_of: Web/JavaScript/Reference/Global_Objects/Date/toTimeString ---- -<div>{{JSRef}}</div> - -<p>Method <strong><code>toTimeString()</code></strong> mengembalikan satuan waktu dari objek {{jsxref("Date")}} object dalam format yang dapat dibaca manusia.</p> - -<h2 id="Sintaks">Sintaks</h2> - -<pre class="syntaxbox"><code><var>dateObj</var>.toTimeString()</code></pre> - -<h2 id="Deskripsi">Deskripsi</h2> - -<p>Instansi {{jsxref("Date")}} menunjuk pada titik waktu spesifik. Dengan memanggil {{jsxref("Date.prototype.toString()", "toString()")}} akan mengembalikan format tanggal dalam bentuk yang mudah dibaca manuasia dengan format tanggal English (Amerika). Di <a href="/en-US/docs/SpiderMonkey">SpiderMonkey</a>, Bagian tanggal terdiri dari (hari, bulan, dan tahun) di ikuti dengan waktu (Jam, menit, detik, dan waktu bagian). Terkadang kita hanya membutuhan bagian waktu dalam bentuk string; hal tersebut bisa di capai dengan menggunakan metod <code>toTimeString()</code>.</p> - -<p>Method <code>toTimeString()</code> sangatlah berguna karena berdasarkan engine (compiliant engine) yang di implementasikan <a href="/en-US/docs/ECMAScript">ECMA-262</a> mungkin string yang diperoleh akan berbeda dari {{jsxref("Date.prototype.toString()", "toString()")}} untuk objek {{jsxref("Date")}}, dengan format tergantung dari implementasi; pendekatan bagian string sederhana kemungkinan tidak sama untuk engine yang berbeda.</p> - -<h2 id="Contoh">Contoh</h2> - -<h3 id="Dasar_penggunaan_of_toTimeString()">Dasar penggunaan of <code>toTimeString()</code></h3> - -<pre class="brush: js">var d = new Date(1993, 6, 28, 14, 39, 7); - -console.log(d.toString()); // logs Wed Jul 28 1993 14:39:07 GMT-0600 (PDT) -console.log(d.toTimeString()); // logs 14:39:07 GMT-0600 (PDT) -</pre> - -<h2 id="Spesifikasi">Spesifikasi</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spesifikasi</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('ES3')}}</td> - <td>{{Spec2('ES3')}}</td> - <td>Initial definition.</td> - </tr> - <tr> - <td>{{SpecName('ES5.1', '#sec-15.9.5.4', 'Date.prototype.toTimeString')}}</td> - <td>{{Spec2('ES5.1')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-date.prototype.totimestring', 'Date.prototype.toTimeString')}}</td> - <td>{{Spec2('ES6')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-date.prototype.totimestring', 'Date.prototype.toTimeString')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Kompabilitas_Browser">Kompabilitas Browser</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fitur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Dukungan dasar</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fitur</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Dukungan dasar</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Lihat_juga">Lihat juga</h2> - -<ul> - <li>{{jsxref("Date.prototype.toLocaleTimeString()")}}</li> - <li>{{jsxref("Date.prototype.toDateString()")}}</li> - <li>{{jsxref("Date.prototype.toString()")}}</li> -</ul> |
