Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: sdk/lib/io/http_date.dart

Issue 2974433002: Remaining private libs (Closed)
Patch Set: It's html_common Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of "io.dart"; 5 part of "dart:io";
6 6
7 /** 7 /**
8 * Utility functions for working with dates with HTTP specific date 8 * Utility functions for working with dates with HTTP specific date
9 * formats. 9 * formats.
10 */ 10 */
11 class HttpDate { 11 class HttpDate {
12 // From RFC-2616 section "3.3.1 Full Date", 12 // From RFC-2616 section "3.3.1 Full Date",
13 // http://tools.ietf.org/html/rfc2616#section-3.3.1 13 // http://tools.ietf.org/html/rfc2616#section-3.3.1
14 // 14 //
15 // HTTP-date = rfc1123-date | rfc850-date | asctime-date 15 // HTTP-date = rfc1123-date | rfc850-date | asctime-date
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 int hour = toInt(timeList[0]); 379 int hour = toInt(timeList[0]);
380 int minute = toInt(timeList[1]); 380 int minute = toInt(timeList[1]);
381 int second = toInt(timeList[2]); 381 int second = toInt(timeList[2]);
382 if (hour > 23) error(); 382 if (hour > 23) error();
383 if (minute > 59) error(); 383 if (minute > 59) error();
384 if (second > 59) error(); 384 if (second > 59) error();
385 385
386 return new DateTime.utc(year, month, dayOfMonth, hour, minute, second, 0); 386 return new DateTime.utc(year, month, dayOfMonth, hour, minute, second, 0);
387 } 387 }
388 } 388 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698