* Headers/Foundation/NSTimeZone.h, Source/NSTimeZone.m

(+knownTimeZoneNames:): New method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20295 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2004-11-05 03:47:03 +00:00
parent a2a82f6a37
commit e5674b2966
4 changed files with 39 additions and 13 deletions

View file

@ -1,3 +1,7 @@
2004-11-04 Georg Fleischmann
* Headers/Foundation/NSTimeZone.h, Source/NSTimeZone.m
(+knownTimeZoneNames:): New method.
2004-11-03 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSThread.m: Revert change from september to fix memory

View file

@ -1,8 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>GNUstep.org</title>
<link rel="stylesheet" href="../gnustep-main.css" type="text/css">
<style type="text/css" media="screen">
@import "../gnustep-main-2.css";
@ -10,16 +11,11 @@
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="header">
<a href="http://gnustep.org/"><img src="../gnustep-header14.jpg" alt="GNUstep.org" width="560" height="74"></a> </div>
<div class="container">
<div class="content">
<h2>GNUstep System Documentation</h2>
<p>
@ -30,8 +26,7 @@
specification created by NeXT, Inc. (now Apple). (<a
href="http://gnustep.org/">Top</a>)
</p>
<div style="clear: both;"></div>
</div>
<div style="clear: both;"></div> </div>
<div class="content">
<h2>User Documentation</h2>
@ -66,8 +61,7 @@
<li><a href="documentation/User/Gui/LanguageSetup.html">Setup for East Asian Languages</a></li>
</ul>
</td>
</tr></table>
</div>
</tr></table> </div>
<div class="content">
<h2>Developer Documentation</h2>
@ -131,8 +125,7 @@
</tr>
</table>
</td>
</tr></table>
</div>
</tr></table> </div>
<div class="content">
@ -161,6 +154,7 @@
<a href="../experience/apps.html">Applications</a><br />
<a href="../resources/documentation/User/GNUstep/userfaq_toc.html">User FAQ</a><br />
<a href="../experience/documentation.html">Getting Started</a><br />
<a href="../information/donate.html">Donations</a><br />
<br />
<b>Developers</b><br />
<a href="../resources/docs-web.html">Documentation</a><br />

View file

@ -40,6 +40,7 @@
// Getting Time Zone Information
+ (NSDictionary*) abbreviationDictionary;
+ (NSArray*) knownTimeZoneNames;
//Getting Arrays of Time Zones
+ (NSArray*) timeZoneArray;

View file

@ -1006,6 +1006,33 @@ static NSMapTable *absolutes = 0;
return abbreviationDictionary;
}
/**
* Returns an array of all known time zone names.
*/
+ (NSArray*) knownTimeZoneNames
{
static NSArray *namesArray = nil;
int i;
id temp_array;
NSArray *regionsArray, *array;
/* We create the array only when we need it to reduce overhead. */
if (namesArray != nil)
return namesArray;
temp_array = [NSMutableArray array];
regionsArray = [self timeZoneArray];
for (i = 0; i < [regionsArray count]; i++)
{
array = [regionsArray objectAtIndex:i];
[temp_array addObjectsFromArray: array];
}
namesArray = [[NSArray alloc] initWithArray: temp_array];
return namesArray;
}
+ (id) allocWithZone: (NSZone*)z
{
if (self == NSTimeZoneClass)