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

Side by Side Diff: lib/src/http_date.dart

Issue 1580233004: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/http_parser@master
Patch Set: Created 4 years, 11 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 | « lib/src/copy/web_socket_impl.dart ('k') | lib/src/media_type.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library http_parser.http_date;
6
7 import 'package:string_scanner/string_scanner.dart'; 5 import 'package:string_scanner/string_scanner.dart';
8 6
9 import 'utils.dart'; 7 import 'utils.dart';
10 8
11 const _WEEKDAYS = const ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; 9 const _WEEKDAYS = const ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
12 const _MONTHS = const ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", 10 const _MONTHS = const ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
13 "Sep", "Oct", "Nov", "Dec"]; 11 "Sep", "Oct", "Nov", "Dec"];
14 12
15 final _shortWeekdayRegExp = new RegExp(r"Mon|Tue|Wed|Thu|Fri|Sat|Sun"); 13 final _shortWeekdayRegExp = new RegExp(r"Mon|Tue|Wed|Thu|Fri|Sat|Sun");
16 final _longWeekdayRegExp = 14 final _longWeekdayRegExp =
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 DateTime _makeDateTime(int year, int month, int day, DateTime time) { 139 DateTime _makeDateTime(int year, int month, int day, DateTime time) {
142 var dateTime = 140 var dateTime =
143 new DateTime.utc(year, month, day, time.hour, time.minute, time.second); 141 new DateTime.utc(year, month, day, time.hour, time.minute, time.second);
144 142
145 // If [day] was too large, it will cause [month] to overflow. 143 // If [day] was too large, it will cause [month] to overflow.
146 if (dateTime.month != month) { 144 if (dateTime.month != month) {
147 throw new FormatException("invalid day '$day' for month '$month'."); 145 throw new FormatException("invalid day '$day' for month '$month'.");
148 } 146 }
149 return dateTime; 147 return dateTime;
150 } 148 }
OLDNEW
« no previous file with comments | « lib/src/copy/web_socket_impl.dart ('k') | lib/src/media_type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698